fixed stuff
This commit is contained in:
parent
f9413c476c
commit
2482644028
58 changed files with 296 additions and 339 deletions
25
README.md
25
README.md
|
|
@ -2,43 +2,46 @@
|
||||||
## Structure :
|
## Structure :
|
||||||
```shell
|
```shell
|
||||||
~/nixos-config/
|
~/nixos-config/
|
||||||
├── flake.nix # pour fixer la source/version des packages utilisés
|
├── flake.nix
|
||||||
│ # permet de fixer la source/version des packages utilisés
|
│ # permet de fixer la source/version des packages utilisés et du point d'entrée user / host
|
||||||
├── flake.lock
|
├── flake.lock
|
||||||
├── hosts/
|
├── hosts/
|
||||||
│ # configuration système
|
│ # configuration système
|
||||||
│ ├── nixos-home/
|
│ ├── nixos-home/
|
||||||
│ │ # mon host de la maison
|
│ │ # mon host PC maison
|
||||||
│ │ └── nixos/
|
│ │ └── nixos/
|
||||||
│ │ ├── configuration.nix # entrée des fichiers de configuration
|
│ │ ├── configuration.nix # entrée des fichiers de configuration
|
||||||
│ │ ├── hardware-configuration.nix # fichier hardware généré à l'installation
|
│ │ ├── hardware-configuration.nix # fichier hardware généré à l'installation
|
||||||
│ │ └── config/ # tous fichiers config
|
│ │ └── config/ # tous fichiers config système (packages et services)
|
||||||
│ │ └── ...
|
│ │ └── ...
|
||||||
│ └── nixos-laptop/
|
│ └── nixos-laptop/
|
||||||
│ # mon host du travail
|
│ # mon host PC travail
|
||||||
│ └── nixos/
|
│ └── nixos/
|
||||||
│ ├── configuration.nix # entrée des fichiers de configuration
|
│ ├── configuration.nix # entrée des fichiers de configuration
|
||||||
│ ├── hardware-configuration.nix # fichier hardware généré à l'installation
|
│ ├── hardware-configuration.nix # fichier hardware généré à l'installation
|
||||||
│ └── config/ # tous fichiers config
|
│ └── config/ # tous fichiers config système (packages et services)
|
||||||
│ └── ...
|
│ └── ...
|
||||||
├── home/
|
├── home/
|
||||||
│ # configuration user
|
│ # configuration user
|
||||||
│ └── afoucaultc/
|
│ └── afoucaultc/
|
||||||
│ # mon user personnel
|
│ # mon user
|
||||||
│ ├── home.nix # point d'entrée home-manager classique
|
│ ├── home.nix # point d'entrée home-manager classique
|
||||||
│ ├── home_laptop.nix # point d'entrée home-manager pour machine light
|
│ ├── home_laptop.nix # point d'entrée home-manager pour machine light
|
||||||
│ ├── dotfiles_apps.nix # liens vers mes dossier de configuration
|
│ ├── dotfiles_apps.nix # liens vers mes dossier de configuration
|
||||||
│ └── packages/ # lien vers les packages installés sur mon user
|
│ └── packages/ # lien vers les packages installés sur mon user
|
||||||
└── ...
|
│ └── ...
|
||||||
|
├── install.sh # script d'installation
|
||||||
|
├── rebuild.sh # script de rebuild
|
||||||
|
└── update.sh # script d'update
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation :
|
## Installation :
|
||||||
1. Installer NixOS sur clé USB (via Rufus sous windows par exemple)
|
1. Installer NixOS sur clé USB (via Rufus sous windows par exemple)
|
||||||
2. Boot sur clé USB
|
2. Boot sur clé USB
|
||||||
3. Suivre les indications (perso: chiffrement LUKS + swap activé + formatage auto)
|
3. Suivre les indications (perso: chiffrement LUKS + swap activé + formatage auto)
|
||||||
4. Reboot dans NixOS
|
4. Reboot dans NixOS sur la machine (pas sur la clé USB !)
|
||||||
5. Cloner le repo git en utilisant git temporairement via nix shell : `nix-shell -p git --run "git clone https://gitlab.com/afoucaultc/nixos-config.git ~/nixos-config"`
|
5. Cloner le repo git en utilisant git temporairement via nix shell : `nix-shell -p git --run "git clone https://gitlab.com/afoucaultc/nixos-config.git ~/nixos-config"`
|
||||||
6. Lancer le `./install` (copie hardware-configuration dans le host, ajoute le host, lance un rebuild)
|
6. Lancer le `./install` (copie hardware-configuration dans le host, ajoute le host et les fichiers de config, lance un rebuild)
|
||||||
7. C'est fini, reboot et lancer la nouvelle version avec Grub
|
7. C'est fini, reboot et lancer la nouvelle version avec Grub
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
|
|
@ -56,6 +59,8 @@ sudo nixos-rebuild switch --flake ~/nixos-config#nixos-home
|
||||||
```
|
```
|
||||||
Ou utiliser `update.sh`
|
Ou utiliser `update.sh`
|
||||||
|
|
||||||
|
Il est possible de mettre à jour la config sans mettre à jour tous les packages, en utilisant `rebuild.sh`
|
||||||
|
|
||||||
### Pour trouver un nouveau package :
|
### Pour trouver un nouveau package :
|
||||||
```nix
|
```nix
|
||||||
nix search nixpkgs nom_du_package
|
nix search nixpkgs nom_du_package
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ hl.config({
|
||||||
rounding_power = 10,
|
rounding_power = 10,
|
||||||
|
|
||||||
-- Change transparency of focused and unfocused windows
|
-- Change transparency of focused and unfocused windows
|
||||||
active_opacity = 0.9,
|
active_opacity = 0.99,
|
||||||
inactive_opacity = 0.9,
|
inactive_opacity = 0.99,
|
||||||
|
|
||||||
shadow = {
|
shadow = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
|
|
|
||||||
30
flake.lock
generated
30
flake.lock
generated
|
|
@ -194,11 +194,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783479733,
|
"lastModified": 1783618078,
|
||||||
"narHash": "sha256-d/JatqgG+Pmo+IuCTZfnrEAPWU3fdha48GQeXuFO+bE=",
|
"narHash": "sha256-F43DGcBoIO8xOZFAfodg3jy0VghB9NGdb6xbTYAIx1A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "cee3f0e7fec85d80c149c7afc29926747f7bd3c2",
|
"rev": "144f4e36d0186195037da9fce80a727108978070",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -282,11 +282,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783449028,
|
"lastModified": 1783582777,
|
||||||
"narHash": "sha256-X7T5MtKdw7daUN2r2v7zVLrN4OKowJ3hgm+rSPeESnw=",
|
"narHash": "sha256-fsDLDZuvet2iZv6svhcMjcO5LjwHrY6VQnJAfND/N+U=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "6a8eb0490ce3ff3cbf9b00815f7a215e895d87e0",
|
"rev": "01f5c9aee4c31e5b782e99eb354ee7230b999821",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -531,11 +531,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783370751,
|
"lastModified": 1783673680,
|
||||||
"narHash": "sha256-E+3MIMvKuo9k+K+qLQ9YXzsBzkgHuyVLnsEbN2DFfuc=",
|
"narHash": "sha256-ardRVG+ipnyyxVdIsbLMy5foO6gDqN/yIi8v10HTJqs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "662bd6e312d2c8b212e32cb377abaee190749320",
|
"rev": "0b655af52b5b89bcceb88737efdc3a7498e751ee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -575,11 +575,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783224372,
|
"lastModified": 1783522502,
|
||||||
"narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=",
|
"narHash": "sha256-iffAls3iaNTyJC2faYcUXSI+Gp02cDjYl+MygxKl2GI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d407951447dcd00442e97087bf374aad70c04cea",
|
"rev": "0bb7ec54c8483066ec9d7720e780a5caa71f8612",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -824,11 +824,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783489920,
|
"lastModified": 1783668941,
|
||||||
"narHash": "sha256-sZediA0pfMCXm6nA6fvO1vEsWvybEvP5GCnaAPDcTq0=",
|
"narHash": "sha256-KFnepHImqltAzpJZ8sh8i3qzC1NRVNQX3WBVoD5oBRM=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "3671c6eceee35fd06fd1f60b71eed968cc9d7449",
|
"rev": "71e156423dae9496d7fd9e89029a1a82516fb9d8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
144
flake.nix
144
flake.nix
|
|
@ -1,68 +1,84 @@
|
||||||
{
|
{
|
||||||
description = "My Nixos";
|
description = "My Nixos";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# nix packages
|
# all nix packages (version unstable)
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
# home manager
|
# home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# hyprland
|
# flake hyprland (git version)
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
# zen browser (communautaire) — follows pour partager les libs système
|
# zen browser (communautaire) — follows pour partager les libs système
|
||||||
zen-browser = {
|
zen-browser = {
|
||||||
url = "github:0xc000022070/zen-browser-flake";
|
url = "github:0xc000022070/zen-browser-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.home-manager.follows = "home-manager";
|
inputs.home-manager.follows = "home-manager";
|
||||||
};
|
};
|
||||||
stylix = {
|
#stylix
|
||||||
url = "github:danth/stylix";
|
stylix = {
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
url = "github:danth/stylix";
|
||||||
};
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# ici :
|
};
|
||||||
# - inputs@ capture l'ensemble des inputs dans une variable "inputs" accessible par
|
# ici :
|
||||||
# "specialArgs" et "extraSpecialArgs. inputs.hyprland pourra être utilisé dans n'importe
|
# - inputs@ capture l'ensemble des inputs dans une variable "inputs" accessible par
|
||||||
# quel fichier importé sans avoir à redéclarer dans flake.nix
|
# "specialArgs" et "extraSpecialArgs". inputs.hyprland pourra être utilisé dans n'importe
|
||||||
# - ajouter dans la ligne d'outputs les nouveaux packages ajoutés en input !
|
# quel fichier importé sans avoir à redéclarer dans flake.nix
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, hyprland, nixos-hardware, zen-browser, stylix, ... }: {
|
# - ajouter dans la ligne d'outputs les nouveaux packages ajoutés en input !
|
||||||
nixosConfigurations.nixos-home = nixpkgs.lib.nixosSystem {
|
outputs =
|
||||||
system = "x86_64-linux";
|
inputs@{
|
||||||
specialArgs = { inherit inputs; };
|
self,
|
||||||
modules = [
|
nixpkgs,
|
||||||
./hosts/nixos-home/configuration.nix
|
home-manager,
|
||||||
stylix.nixosModules.stylix
|
hyprland,
|
||||||
home-manager.nixosModules.home-manager
|
nixos-hardware,
|
||||||
{
|
zen-browser,
|
||||||
home-manager.useGlobalPkgs = true;
|
stylix,
|
||||||
home-manager.useUserPackages = true;
|
...
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
}:
|
||||||
home-manager.users.afoucaultc = import ./home/afoucaultc/home.nix;
|
# pour la configuration nixos-home
|
||||||
home-manager.backupFileExtension = "backup";
|
{
|
||||||
|
nixosConfigurations.nixos-home = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
||||||
|
./hosts/nixos-home/configuration.nix
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
# default config
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
# emplacement de la config
|
||||||
|
home-manager.users.afoucaultc = import ./home/afoucaultc/home.nix;
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
}
|
# pour la configuration home-laptop
|
||||||
];
|
nixosConfigurations.nixos-laptop = nixpkgs.lib.nixosSystem {
|
||||||
};
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
# ── ThinkPad E560 (i5-6200U, HD 520, 4 Gio RAM) : profil léger ──
|
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
||||||
nixosConfigurations.nixos-laptop = nixpkgs.lib.nixosSystem {
|
./hosts/nixos-laptop/configuration.nix
|
||||||
system = "x86_64-linux";
|
stylix.nixosModules.stylix
|
||||||
specialArgs = { inherit inputs; };
|
home-manager.nixosModules.home-manager
|
||||||
modules = [
|
{
|
||||||
./hosts/nixos-laptop/configuration.nix
|
# default config
|
||||||
stylix.nixosModules.stylix
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.useUserPackages = true;
|
||||||
{
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
home-manager.useGlobalPkgs = true;
|
# emplacement de la config
|
||||||
home-manager.useUserPackages = true;
|
home-manager.users.afoucaultc = import ./home/afoucaultc/home-laptop.nix;
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
home-manager.backupFileExtension = "backup";
|
||||||
home-manager.users.afoucaultc = import ./home/afoucaultc/home-laptop.nix;
|
}
|
||||||
home-manager.backupFileExtension = "backup";
|
];
|
||||||
}
|
};
|
||||||
];
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
# dotfiles pour inkscape (fichier dimensionné pour LaTeX)
|
||||||
rofi
|
|
||||||
];
|
|
||||||
xdg.configFile."inkscape".source =
|
xdg.configFile."inkscape".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/inkscape";
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/inkscape";
|
||||||
|
# dotfiles pour Rofi
|
||||||
xdg.configFile."rofi".source =
|
xdg.configFile."rofi".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/rofi";
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/rofi";
|
||||||
|
# dotfiles pour hyprland
|
||||||
xdg.configFile."hypr".source =
|
xdg.configFile."hypr".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/hypr";
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/hypr";
|
||||||
|
# dotfiles nvim
|
||||||
|
xdg.configFile."nvim".source =
|
||||||
|
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/nvim";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home.username = "afoucaultc";
|
home.username = "afoucaultc";
|
||||||
home.homeDirectory = "/home/afoucaultc";
|
home.homeDirectory = "/home/afoucaultc";
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "26.05";
|
||||||
imports = [
|
imports = [
|
||||||
|
# fichier individuel dans packages = programs.xyz existant
|
||||||
|
# sinon, dans other_apps*
|
||||||
./packages/btop.nix
|
./packages/btop.nix
|
||||||
./packages/firefox.nix
|
./packages/firefox.nix
|
||||||
./packages/git.nix
|
./packages/git.nix
|
||||||
|
|
@ -14,6 +16,7 @@
|
||||||
./packages/nextcloud.nix
|
./packages/nextcloud.nix
|
||||||
./packages/other_apps_light.nix
|
./packages/other_apps_light.nix
|
||||||
./packages/pass.nix
|
./packages/pass.nix
|
||||||
|
./packages/protonmail.nix
|
||||||
./packages/texlive.nix
|
./packages/texlive.nix
|
||||||
./packages/thunderbird.nix
|
./packages/thunderbird.nix
|
||||||
./packages/tmux.nix
|
./packages/tmux.nix
|
||||||
|
|
@ -23,5 +26,6 @@
|
||||||
# dotfiles links
|
# dotfiles links
|
||||||
./dotfiles_apps.nix
|
./dotfiles_apps.nix
|
||||||
];
|
];
|
||||||
|
# désactivation de stylix pour des logiciels lourds comme inkscape
|
||||||
stylix.targets.gtksourceview.enable = false;
|
stylix.targets.gtksourceview.enable = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home.username = "afoucaultc";
|
home.username = "afoucaultc";
|
||||||
home.homeDirectory = "/home/afoucaultc";
|
home.homeDirectory = "/home/afoucaultc";
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "26.05";
|
||||||
imports = [
|
imports = [
|
||||||
|
# fichier individuel dans packages = programs.xyz existant
|
||||||
|
# sinon, dans other_apps*
|
||||||
./packages/btop.nix
|
./packages/btop.nix
|
||||||
./packages/firefox.nix
|
./packages/firefox.nix
|
||||||
./packages/git.nix
|
./packages/git.nix
|
||||||
|
|
@ -14,6 +16,7 @@
|
||||||
./packages/nextcloud.nix
|
./packages/nextcloud.nix
|
||||||
./packages/other_apps.nix
|
./packages/other_apps.nix
|
||||||
./packages/pass.nix
|
./packages/pass.nix
|
||||||
|
./packages/protonmail.nix
|
||||||
./packages/texlive.nix
|
./packages/texlive.nix
|
||||||
./packages/thunderbird.nix
|
./packages/thunderbird.nix
|
||||||
./packages/tmux.nix
|
./packages/tmux.nix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
hyprpaper
|
hyprpaper
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
neovim-unwrapped
|
neovim-unwrapped
|
||||||
# outils dont lazy.nvim / les LSP ont besoin
|
# besoins pour LSP et lazy vim
|
||||||
ripgrep
|
ripgrep
|
||||||
fd
|
fd
|
||||||
gcc
|
gcc
|
||||||
gnumake
|
gnumake
|
||||||
nodejs
|
nodejs
|
||||||
unzip
|
unzip
|
||||||
# formatters généraux
|
# formatters
|
||||||
lua-language-server
|
lua-language-server
|
||||||
stylua
|
stylua
|
||||||
nil
|
nil
|
||||||
nixfmt-rfc-style # binaire "nixfmt" pour conform
|
nixfmt
|
||||||
# LSP serveurs (remplacent Mason)
|
# LSP serveurs (remplacent Mason)
|
||||||
marksman
|
marksman
|
||||||
pyright
|
pyright
|
||||||
# LSP que tu avais dans Mason — décommente selon besoin
|
# LSP sélectionnés dans mason
|
||||||
clang-tools # clangd
|
clang-tools # clangd
|
||||||
bash-language-server # bashls
|
bash-language-server # bashls
|
||||||
vscode-langservers-extracted # cssls, jsonls, html, eslint
|
vscode-langservers-extracted # cssls, jsonls, html, eslint
|
||||||
|
|
@ -44,7 +44,4 @@
|
||||||
vi = "nvim";
|
vi = "nvim";
|
||||||
vim = "nvim";
|
vim = "nvim";
|
||||||
};
|
};
|
||||||
# ~/.config/nvim -> tes dotfiles, éditables en place
|
|
||||||
xdg.configFile."nvim".source =
|
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/nvim";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.nextcloud-client = {
|
services.nextcloud-client = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# --- Others
|
|
||||||
hyfetch
|
|
||||||
fastfetch
|
|
||||||
pkg-config
|
|
||||||
# --- Bureautique ---
|
# --- Bureautique ---
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
typora
|
typora
|
||||||
|
|
@ -13,6 +9,7 @@
|
||||||
signal-desktop
|
signal-desktop
|
||||||
vesktop
|
vesktop
|
||||||
mattermost-desktop
|
mattermost-desktop
|
||||||
|
protonmail-bridge
|
||||||
# --- Multimédia ---
|
# --- Multimédia ---
|
||||||
gimp
|
gimp
|
||||||
inkscape
|
inkscape
|
||||||
|
|
@ -25,13 +22,12 @@
|
||||||
# --- Maths ---
|
# --- Maths ---
|
||||||
(octave.withPackages (
|
(octave.withPackages (
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
image # octave-image
|
image
|
||||||
statistics # octave-statistics
|
statistics
|
||||||
symbolic # octave-symbolic
|
symbolic
|
||||||
# dataframe # (octave-dataframe : indispo dans nixpkgs, à compiler via pkg si besoin)
|
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
gnuplot # gnuplot
|
gnuplot
|
||||||
# --- Gestion de fichiers KDE ---
|
# --- Gestion de fichiers KDE ---
|
||||||
kdePackages.dolphin
|
kdePackages.dolphin
|
||||||
kdePackages.dolphin-plugins
|
kdePackages.dolphin-plugins
|
||||||
|
|
@ -40,17 +36,19 @@
|
||||||
kdePackages.ark
|
kdePackages.ark
|
||||||
kdePackages.kdegraphics-thumbnailers
|
kdePackages.kdegraphics-thumbnailers
|
||||||
kdePackages.ffmpegthumbs
|
kdePackages.ffmpegthumbs
|
||||||
nwg-look
|
# --- Others
|
||||||
papirus-icon-theme
|
hyfetch
|
||||||
|
fastfetch
|
||||||
|
pkg-config
|
||||||
mako
|
mako
|
||||||
cliphist
|
cliphist
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
mullvad-vpn
|
mullvad-vpn
|
||||||
|
rofi
|
||||||
|
# --- Themes
|
||||||
|
nwg-look
|
||||||
|
papirus-icon-theme
|
||||||
|
bibata-cursors
|
||||||
];
|
];
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
pinentry.package = pkgs.pinentry-gnome3;
|
|
||||||
};
|
|
||||||
services.protonmail-bridge.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,58 +1,45 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# --- Infos système / divers ---
|
# --- Bureautique
|
||||||
hyfetch # hyfetch
|
libreoffice-fresh
|
||||||
fastfetch # fastfetch
|
zotero
|
||||||
pkg-config
|
pandoc
|
||||||
|
# --- Communication
|
||||||
# --- Bureautique ---
|
signal-desktop
|
||||||
libreoffice-fresh # libreoffice-fresh
|
mattermost-desktop
|
||||||
zotero # zotero (AUR)
|
protonmail-bridge
|
||||||
pandoc # pandoc-cli
|
# --- Multimédia
|
||||||
|
gimp
|
||||||
# --- Communication / mail ---
|
inkscape
|
||||||
# thunderbird # thunderbird
|
nomacs
|
||||||
signal-desktop # signal-desktop
|
imagemagick
|
||||||
mattermost-desktop # mattermost-desktop
|
librsvg
|
||||||
protonmail-bridge # protonmail-bridge (CLI/bridge)
|
# --- Maths
|
||||||
|
|
||||||
# --- Multimédia (léger) ---
|
|
||||||
gimp # gimp
|
|
||||||
inkscape # inkscape
|
|
||||||
nomacs # nomacs (AUR) — visionneuse d'images légère
|
|
||||||
imagemagick # imagemagick
|
|
||||||
librsvg # librsvg
|
|
||||||
|
|
||||||
# --- Maths / sciences ---
|
|
||||||
(octave.withPackages (
|
(octave.withPackages (
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
image # octave-image
|
image
|
||||||
statistics # octave-statistics
|
statistics
|
||||||
symbolic # octave-symbolic
|
symbolic
|
||||||
# dataframe # (octave-dataframe : indispo dans nixpkgs, à compiler via pkg si besoin)
|
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
gnuplot # gnuplot
|
gnuplot
|
||||||
|
# --- Fichiers
|
||||||
# --- Fichiers / bureau ---
|
nautilus
|
||||||
nautilus # nautilus (gestionnaire léger)
|
# --- Others
|
||||||
nwg-look # nwg-look
|
hyfetch
|
||||||
papirus-icon-theme # papirus-icon-theme
|
fastfetch
|
||||||
brightnessctl # brightnessctl
|
pkg-config
|
||||||
mako # mako (notifications légères, remplace noctalia)
|
brightnessctl
|
||||||
cliphist # cliphist
|
mako
|
||||||
|
cliphist
|
||||||
grim
|
grim
|
||||||
slurp # captures (grimblast côté script si besoin)
|
slurp
|
||||||
mullvad-vpn # GUI Mullvad (le service est côté système)
|
mullvad-vpn
|
||||||
# themes
|
rofi
|
||||||
|
# --- Themes
|
||||||
|
nwg-look
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
bibata-cursors
|
bibata-cursors
|
||||||
];
|
];
|
||||||
programs.gpg.enable = true;
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
pinentry.package = pkgs.pinentry-curses;
|
|
||||||
};
|
|
||||||
services.protonmail-bridge.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.password-store = {
|
programs.password-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
9
home/afoucaultc/packages/protonmail.nix
Normal file
9
home/afoucaultc/packages/protonmail.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# agent pour les clés gpg demandées par protonmail
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
pinentry.package = pkgs.pinentry-curses;
|
||||||
|
};
|
||||||
|
services.protonmail-bridge.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
texliveFull
|
texliveFull
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.thunderbird = {
|
programs.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
imports = [ inputs.zen-browser.homeModules.beta ];
|
imports = [ inputs.zen-browser.homeModules.beta ];
|
||||||
programs.zen-browser = {
|
programs.zen-browser = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# grub utilisé pour le bootloader
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
useOSProber = true;
|
useOSProber = false;
|
||||||
|
# nombre de configurations à garder en mémoire
|
||||||
configurationLimit = 10;
|
configurationLimit = 10;
|
||||||
};
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
|
||||||
|
|
@ -15,21 +15,17 @@
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true; # requis pour Wayland/Hyprland
|
modesetting.enable = true; # requis pour Wayland/Hyprland
|
||||||
# dGPU endormi en général, offload sinon
|
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
# powerManagement.finegrained = true; # nécessite offload (ci-dessous)
|
# RTX 2060 = Turing. Le driver "open" fonctionne pour Turing+, mais le propriétaire reste plus mature sur cette génération.
|
||||||
# RTX 2060 = Turing. Le driver "open" fonctionne pour Turing+, mais le
|
|
||||||
# propriétaire reste plus mature sur cette génération. Garde `open = false`.
|
|
||||||
open = false;
|
open = false;
|
||||||
nvidiaSettings = true; # fournit `nvidia-settings`
|
nvidiaSettings = true; # fournit `nvidia-settings`
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
prime = {
|
prime = {
|
||||||
sync.enable = true;
|
sync.enable = true;
|
||||||
#offload = {
|
#offload = {
|
||||||
# enable = true; # dGPU à la demande (meilleure autonomie)
|
# enable = true;
|
||||||
# enableOffloadCmd = true; # fournit la commande `nvidia-offload`
|
# enableOffloadCmd = true;
|
||||||
#};
|
#};
|
||||||
# nix shell nixpkgs#pciutils -c lspci -D -d ::03xx
|
|
||||||
intelBusId = "PCI:0:2:0";
|
intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
# ── Mullvad VPN ──
|
# mullvad VPN
|
||||||
services.mullvad-vpn = {
|
services.mullvad-vpn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mullvad-vpn;
|
package = pkgs.mullvad-vpn;
|
||||||
};
|
};
|
||||||
# ── Steam ──
|
# steam
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
memoryPercent = 50;
|
memoryPercent = 50;
|
||||||
};
|
};
|
||||||
# ── Intégration KDE/Dolphin ──
|
# ajouts pour KDE/dolphin
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
services.tumbler.enable = true;
|
services.tumbler.enable = true;
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,29 @@
|
||||||
{ config, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
# Sans / Source (adobe-source-*-fonts, source-han-sans)
|
# Sans / Source (adobe-source-*-fonts, source-han-sans)
|
||||||
source-sans
|
source-sans
|
||||||
source-serif
|
source-serif
|
||||||
source-han-sans # adobe-source-han-sans-otc-fonts
|
source-han-sans # adobe-source-han-sans-otc-fonts
|
||||||
source-han-serif
|
source-han-serif
|
||||||
|
|
||||||
# Noto + emoji + CJK (noto-fonts-cjk, noto-fonts-emoji)
|
# Noto + emoji + CJK (noto-fonts-cjk, noto-fonts-emoji)
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-cjk-serif
|
noto-fonts-cjk-serif
|
||||||
noto-fonts-color-emoji
|
noto-fonts-color-emoji
|
||||||
|
|
||||||
# Microsoft / Windows (ttf-ms-fonts + corefonts)
|
# Microsoft / Windows (ttf-ms-fonts + corefonts)
|
||||||
corefonts
|
corefonts
|
||||||
vista-fonts # tahoma, etc. (unfree)
|
vista-fonts # tahoma, etc. (unfree)
|
||||||
|
|
||||||
# Latin Modern / TeX Gyre (otf-latin-modern, tex-gyre-math)
|
# Latin Modern / TeX Gyre (otf-latin-modern, tex-gyre-math)
|
||||||
lmodern
|
lmodern
|
||||||
gyre-fonts
|
gyre-fonts
|
||||||
|
|
||||||
# Accessibilité (ttf-luciole)
|
# Accessibilité (ttf-luciole)
|
||||||
texlivePackages.luciole
|
texlivePackages.luciole
|
||||||
|
|
||||||
# Nerd fonts / symboles (ttf-nerd-fonts-symbols, font-awesome, woff2-font-awesome)
|
# Nerd fonts / symboles (ttf-nerd-fonts-symbols, font-awesome, woff2-font-awesome)
|
||||||
nerd-fonts.symbols-only
|
nerd-fonts.symbols-only
|
||||||
font-awesome
|
font-awesome
|
||||||
|
|
||||||
# Fontes de code utiles
|
# Fontes de code utiles
|
||||||
fira-code
|
fira-code
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
|
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,10 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Portails XDG (captures d'écran, partage d'écran, file pickers Wayland)
|
# Portails XDG (captures d'écran, partage d'écran, file pickers Wayland)
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||||
};
|
};
|
||||||
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.tlp.enable = true;
|
services.tlp.enable = true;
|
||||||
services.power-profiles-daemon.enable = false;
|
services.power-profiles-daemon.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.pulseaudio.enable = false;
|
services.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# style global
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
targets.gtksourceview.enable = false;
|
targets.gtksourceview.enable = false;
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
|
|
||||||
cursor = {
|
cursor = {
|
||||||
package = pkgs.bibata-cursors;
|
package = pkgs.bibata-cursors;
|
||||||
name = "Bibata-Modern-Ice";
|
name = "Bibata-Modern-Ice";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "nixos-home";
|
hostName = "nixos-home";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
# open ports manually if needed
|
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
users.users.afoucaultc = {
|
users.users.afoucaultc = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
{
|
{ inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# faire nixos-generate-config dans le bon dossier
|
# généré à l'installation avec nixos-generate-config
|
||||||
|
# à copier dans le dossier courant depuis /etc/nixos
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
# ensemble de packages et configurations système
|
||||||
./config/bluetooth.nix
|
./config/bluetooth.nix
|
||||||
./config/boot.nix
|
./config/boot.nix
|
||||||
./config/drivers_video.nix
|
./config/drivers_video.nix
|
||||||
|
|
@ -24,17 +21,19 @@
|
||||||
./config/user.nix
|
./config/user.nix
|
||||||
# profil nixos pour mon ordi portable
|
# profil nixos pour mon ordi portable
|
||||||
# nécessite l'input nixos-hardware dans flake.nix.
|
# nécessite l'input nixos-hardware dans flake.nix.
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
inputs.nixos-hardware.nixosModules.common-cpu-intel # active le microcode intel, KMS pour GPU intégré, etc...
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
inputs.nixos-hardware.nixosModules.common-pc-laptop # active tlp
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd # active le TRIM périodique pour le SSD
|
||||||
];
|
];
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
#nixpkgs.config.permittedInsecurePackages = [
|
# ne pas toucher, défini une seule fois en fonction de la version de nixos de l'ISO pour la 1ère installation
|
||||||
# "pnpm-10.29.2"
|
|
||||||
#];
|
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
|
# nécessaire pour permettre des dépendances problématiques parfois
|
||||||
|
#nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
# "electron-39.8.10"
|
||||||
|
#];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,6 @@
|
||||||
# Host `nixos-laptop` — ThinkPad E560
|
# Host `nixos-laptop` — ThinkPad E560
|
||||||
|
|
||||||
Profil **léger et faible RAM (4 Gio)** : i5-6200U, Intel HD 520 (pas de GPU
|
Profil **léger et faible RAM (4 Gio)** : i5-6200U, Intel HD 520 (pas de GPU dédié)
|
||||||
dédié), pas de Steam, pas de Noctalia (remplacé par `mako`), pas de gros stack
|
|
||||||
KDE (on utilise `nautilus`).
|
|
||||||
|
|
||||||
## Installer
|
|
||||||
```bash
|
|
||||||
./install.sh nixos-laptop # ou ./install.sh puis choisir 2
|
|
||||||
```
|
|
||||||
Le script pousse explicitement les caches binaires (cache.nixos.org, Hyprland,
|
|
||||||
nix-community) dès le premier rebuild → quasiment aucune compilation locale.
|
|
||||||
|
|
||||||
## Mettre à jour
|
|
||||||
```bash
|
|
||||||
./update.sh nixos-laptop # ou juste ./update.sh (détecte le hostname)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Faible RAM — ce qui est en place (`config/low-ram.nix`)
|
## Faible RAM — ce qui est en place (`config/low-ram.nix`)
|
||||||
- `max-jobs = 1`, `cores = 2` : on ne sature pas les 4 Gio pendant un build.
|
- `max-jobs = 1`, `cores = 2` : on ne sature pas les 4 Gio pendant un build.
|
||||||
|
|
@ -25,24 +11,13 @@ nix-community) dès le premier rebuild → quasiment aucune compilation locale.
|
||||||
|
|
||||||
### Si un rebuild rame quand même
|
### Si un rebuild rame quand même
|
||||||
Un paquet absent des caches sera compilé localement. Deux options :
|
Un paquet absent des caches sera compilé localement. Deux options :
|
||||||
1. Éviter les inputs qui forcent la compilation (ex. builds custom).
|
1. Éviter les inputs qui forcent la compilation
|
||||||
2. Créer ton propre cache Cachix et y pousser depuis le poste maison :
|
2. Créer son propre cache Cachix et y pousser depuis le poste maison :
|
||||||
```bash
|
```bash
|
||||||
# sur le poste maison, après un build :
|
# sur le poste maison, après un build :
|
||||||
cachix push mon-cache ./result
|
cachix push mon-cache ./result
|
||||||
```
|
```
|
||||||
puis ajouter `https://mon-cache.cachix.org` aux `substituters` de
|
puis ajouter `https://mon-cache.cachix.org` aux `substituters` de `config/low-ram.nix`. Le laptop récupèrera alors les binaires sans compiler.
|
||||||
`config/low-ram.nix`. Le laptop récupèrera alors les binaires sans compiler.
|
|
||||||
|
|
||||||
## Noms de paquets à vérifier (traduits depuis pacman/AUR)
|
|
||||||
Je n'ai pas pu évaluer contre nixpkgs ici. Vérifie ceux-ci si un rebuild
|
|
||||||
échoue sur un attribut manquant (`nix search nixpkgs <nom>`) :
|
|
||||||
- `planify` (≈ `planner`), `nomacs`, `han-nom`, `bitwarden-cli`,
|
|
||||||
`bitwarden-desktop`, `mattermost-desktop`, `vaapiIntel` (peut être aliasé).
|
|
||||||
- Toolkits Octave : `image`, `statistics`, `symbolic` OK ; `dataframe` est
|
|
||||||
commenté (indispo).
|
|
||||||
- `octave-datatypes`, `grimblast`, `zen-browser` : gérés autrement (input zen,
|
|
||||||
grim/slurp), pas besoin de l'AUR.
|
|
||||||
|
|
||||||
## Empreinte digitale
|
## Empreinte digitale
|
||||||
`services.fprintd.enable = true`. Enrôle avec `fprintd-enroll` après install.
|
`services.fprintd.enable = true`. `fprintd-enroll` après install.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# grub utilisé pour le bootloader
|
||||||
boot.kernelPackages = pkgs.linuxPackages;
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
|
# nombre de configurations à garder en mémoire
|
||||||
configurationLimit = 5;
|
configurationLimit = 5;
|
||||||
};
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
# ── Mullvad VPN ── (remplace mullvad-vpn-bin de l'AUR)
|
# mullvad VPN
|
||||||
services.mullvad-vpn = {
|
services.mullvad-vpn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mullvad-vpn;
|
package = pkgs.mullvad-vpn;
|
||||||
};
|
};
|
||||||
# ── Intégration gestionnaire de fichiers (miniatures, montage…) ──
|
# intégration gestionnaire de fichiers (pour Dolphin)
|
||||||
services.gvfs.enable = true;
|
#services.gvfs.enable = true;
|
||||||
services.tumbler.enable = true;
|
#services.tumbler.enable = true;
|
||||||
environment.sessionVariables = {
|
#environment.sessionVariables = {
|
||||||
NIXOS_OZONE_WL = "1";
|
# NIXOS_OZONE_WL = "1";
|
||||||
};
|
#};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
# Sans / Source (adobe-source-*-fonts, source-han-sans)
|
# Sans / Source (adobe-source-*-fonts, source-han-sans)
|
||||||
source-sans
|
source-sans
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,12 @@
|
||||||
|
{ ... }:
|
||||||
{
|
{
|
||||||
config,
|
# privilège pour les paquets précompilés pour que la RAM ne soit pas trop sollicitée
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# ─────────────────────────────────────────────────────────────
|
|
||||||
# Machine à faible RAM (4 GiB) : on privilégie TOUJOURS les
|
|
||||||
# binaires pré-compilés (caches) plutôt que la compilation locale.
|
|
||||||
# ─────────────────────────────────────────────────────────────
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
# Caches binaires : on récupère un maximum de paquets déjà
|
# Caches binaires
|
||||||
# compilés pour éviter de compiler sur cette machine.
|
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
|
|
@ -35,38 +26,31 @@
|
||||||
"root"
|
"root"
|
||||||
"@wheel"
|
"@wheel"
|
||||||
];
|
];
|
||||||
# Toujours interroger les caches, ne jamais partir du principe
|
# utiliser les caches par défaut
|
||||||
# qu'un paquet doit être compilé localement.
|
|
||||||
builders-use-substitutes = true;
|
builders-use-substitutes = true;
|
||||||
fallback = true; # si un cache tombe, on tente ailleurs
|
fallback = true; # si un cache tombe, on tente ailleurs
|
||||||
connect-timeout = 10;
|
connect-timeout = 10;
|
||||||
# Limiter la pression mémoire pendant la construction :
|
# limitation de l'utilisation de la RAM
|
||||||
# peu de jobs en parallèle, sinon 4 Gio saturent vite.
|
|
||||||
max-jobs = 1; # une dérivation à la fois
|
max-jobs = 1; # une dérivation à la fois
|
||||||
cores = 2; # les 2 cœurs du i5-6200U par job
|
cores = 2; # les 2 coeurs du i5-6200U par job
|
||||||
};
|
};
|
||||||
# Auto-optimisation du store (déduplication) pour économiser le disque.
|
# optimisation du store
|
||||||
nix.settings.auto-optimise-store = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
# ─────────────────────────────────────────────────────────────
|
# zram : compression du swap en RAM pour absorber les pics du rebuild
|
||||||
# zram : swap compressé en RAM. Indispensable avec 4 Gio, à la
|
|
||||||
# fois pour l'usage courant et pour absorber les pics du rebuild.
|
|
||||||
# ─────────────────────────────────────────────────────────────
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
memoryPercent = 150; # jusqu'à 1.5x la RAM (zstd compresse ~3:1)
|
memoryPercent = 150;
|
||||||
priority = 100;
|
priority = 100;
|
||||||
};
|
};
|
||||||
# Le noyau peut « swaper » agressivement vers zram (rapide) plutôt
|
# swap du noyau si nécessaire
|
||||||
# que de tuer des process pendant un build.
|
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"vm.swappiness" = 180; # favorise zram
|
"vm.swappiness" = 180;
|
||||||
"vm.watermark_boost_factor" = 0;
|
"vm.watermark_boost_factor" = 0;
|
||||||
"vm.watermark_scale_factor" = 125;
|
"vm.watermark_scale_factor" = 125;
|
||||||
"vm.page-cluster" = 0; # recommandé avec zram
|
"vm.page-cluster" = 0;
|
||||||
};
|
};
|
||||||
# earlyoom : tue proprement le process le plus gourmand avant que la
|
# empêche la machine de freeze totalement si un process est trop gourmand
|
||||||
# machine ne se fige totalement (utile si un build déborde malgré tout).
|
|
||||||
services.earlyoom = {
|
services.earlyoom = {
|
||||||
enable = true;
|
enable = true;
|
||||||
freeMemThreshold = 5; # agit quand il reste < 5% de RAM libre
|
freeMemThreshold = 5; # agit quand il reste < 5% de RAM libre
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
# ThinkPad E560 : TLP pour l'autonomie. Pas d'asusd (spécifique ASUS).
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
# Seuils de charge batterie (préserve la batterie).
|
|
||||||
# Fonctionne sur la plupart des ThinkPad via tp_smapi/acpi.
|
|
||||||
START_CHARGE_THRESH_BAT0 = 40;
|
START_CHARGE_THRESH_BAT0 = 40;
|
||||||
STOP_CHARGE_THRESH_BAT0 = 80;
|
STOP_CHARGE_THRESH_BAT0 = 80;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.power-profiles-daemon.enable = false;
|
services.power-profiles-daemon.enable = false;
|
||||||
# Économie d'énergie supplémentaire.
|
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.pulseaudio.enable = false;
|
services.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# style global
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
targets.gtksourceview.enable = false;
|
targets.gtksourceview.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "nixos-laptop";
|
hostName = "nixos-laptop";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
# ouvrir des ports manuellement si besoin
|
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
users.users.afoucaultc = {
|
users.users.afoucaultc = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
{
|
{ inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# généré à l'installation avec nixos-generate-config
|
# généré à l'installation avec nixos-generate-config
|
||||||
|
# à copier dans le dossier courant depuis /etc/nixos
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
# ensemble de packages et configurations système
|
||||||
./config/bluetooth.nix
|
./config/bluetooth.nix
|
||||||
./config/boot.nix
|
./config/boot.nix
|
||||||
./config/drivers_video.nix
|
./config/drivers_video.nix
|
||||||
|
|
@ -15,7 +12,6 @@
|
||||||
./config/fonts.nix
|
./config/fonts.nix
|
||||||
./config/hyprland.nix
|
./config/hyprland.nix
|
||||||
./config/language.nix
|
./config/language.nix
|
||||||
./config/low-ram.nix
|
|
||||||
./config/power_management.nix
|
./config/power_management.nix
|
||||||
./config/sound.nix
|
./config/sound.nix
|
||||||
./config/stylix.nix
|
./config/stylix.nix
|
||||||
|
|
@ -23,15 +19,22 @@
|
||||||
./config/system_saves.nix
|
./config/system_saves.nix
|
||||||
./config/system_services.nix
|
./config/system_services.nix
|
||||||
./config/user.nix
|
./config/user.nix
|
||||||
# profil nixos-hardware pour le ThinkPad E560 (Skylake, i5-6200U)
|
# ajout pour forcer l'utilisation de cachix au max
|
||||||
# nécessite l'input nixos-hardware dans flake.nix.
|
./config/low-ram.nix
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
# profil nixos-hardware pour le ThinkPad E560
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
# nécessite l'input nixos-hardware dans flake.nix
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
inputs.nixos-hardware.nixosModules.common-cpu-intel # active le microcode intel
|
||||||
|
inputs.nixos-hardware.nixosModules.common-pc-laptop # active tlp
|
||||||
|
];
|
||||||
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
];
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
# ne pas toucher, défini une seule fois en fonction de la version de nixos de l'ISO pour la 1ère installation
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
# nécessaire pour permettre des dépendances problématiques parfois
|
||||||
"electron-39.8.10"
|
#nixpkgs.config.permittedInsecurePackages = [
|
||||||
];
|
# "electron-39.8.10"
|
||||||
|
#];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue