This commit is contained in:
afoucaultc 2026-07-07 20:42:01 +02:00
parent cb4bf3be89
commit df94405cef
51 changed files with 893 additions and 817 deletions

View file

@ -68,3 +68,30 @@ nix search nixpkgs nom_du_package
2. Package pas encore dans nixpkgs : chercher un flake upstream officiel (packages.<system>.degault), ajouter comme input et le référencer 2. Package pas encore dans nixpkgs : chercher un flake upstream officiel (packages.<system>.degault), ajouter comme input et le référencer
### Machine ancienne ### Machine ancienne
Bien utiliser la version `laptop` qui prend la plupart des paquets par cachix (pour éviter la compilation en locale qui dépasse les capacités de la RAM) Bien utiliser la version `laptop` qui prend la plupart des paquets par cachix (pour éviter la compilation en locale qui dépasse les capacités de la RAM)
### Ensuite
#### Thunderbird
Générer clé GPG
`gpg --quick-generate-key "afoucaultc" default default never`
Afficher la clé
`gpg --list-secret-keys --keyid-format=long`
Initialiser avec pass (empreinte = dernière partie après sec)
`pass init <empreinte>`
Fermer en partie les permissions sur .gnupg
```bash
chmod 700 ~/.gnupg
chmod 600 ~/.gnupg/* 2>/dev/null
find ~/.gnupg -type d -exec chmod 700 {} \;
find ~/.gnupg -type f -exec chmod 600 {} \;
```
Lancer le proton mail bridge
```shell
protonmail-bridge --cli
>>> login #(puis se login)
```
Ensuite normalement c'est bon, taper "info" pour récupérer le mot de passe
Puis `cert export` et le mettre dans le home par exemple. Ensuite :
`parametres -> vie privée et sécurité -> certificats -> gérer -> autorités -> importer`
Importer et cocher site web.
Puis se connecter à son compte sur thunderbird : il faut faire `info` sur le protonmail bridge, pour récupérer son mot de passe, puis valider l'exception pour le certificat.

View file

@ -12,3 +12,10 @@ hl.window_rule({
}, },
opacity = 2, opacity = 2,
}) })
hl.window_rule({
name = "opacity vesktop",
match = {
class = "vesktop",
},
opacity = 2,
})

View file

@ -0,0 +1,8 @@
return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
nix = { "nixfmt" }, -- remplace par "alejandra" si tu préfères
},
},
}

View file

@ -1,18 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
rofi rofi
]; ];
xdg.configFile."inkscape".source =
xdg.configFile."inkscape".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/inkscape";
config.lib.file.mkOutOfStoreSymlink xdg.configFile."rofi".source =
"${config.home.homeDirectory}/nixos-config/dotfiles/inkscape"; config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/rofi";
xdg.configFile."hypr".source =
xdg.configFile."rofi".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/hypr";
config.lib.file.mkOutOfStoreSymlink
"${config.home.homeDirectory}/nixos-config/dotfiles/rofi";
xdg.configFile."hypr".source =
config.lib.file.mkOutOfStoreSymlink
"${config.home.homeDirectory}/nixos-config/dotfiles/hypr";
} }

View file

@ -1,28 +1,26 @@
{ config, pkgs, ... }: { 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 = ./packages/btop.nix
[ ./packages/firefox.nix
./packages/btop.nix ./packages/git.nix
./packages/firefox.nix ./packages/hyprland.nix
./packages/git.nix ./packages/kitty.nix
./packages/hyprland.nix ./packages/mpv.nix
./packages/kitty.nix ./packages/neovim.nix
./packages/mpv.nix ./packages/other_apps_light.nix
./packages/neovim.nix ./packages/pass.nix
./packages/other_apps_light.nix ./packages/texlive.nix
./packages/pass.nix ./packages/thunderbird.nix
./packages/texlive.nix ./packages/tmux.nix
./packages/thunderbird.nix ./packages/zathura.nix
./packages/tmux.nix ./packages/zen.nix
./packages/zathura.nix ./packages/zsh.nix
./packages/zen.nix # dotfiles links
./packages/zsh.nix ./dotfiles_apps.nix
# dotfiles links ];
./dotfiles_apps.nix stylix.targets.gtksourceview.enable = false;
];
stylix.targets.gtksourceview.enable = false;
} }

View file

@ -1,27 +1,25 @@
{ config, pkgs, ... }: { 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 = ./packages/btop.nix
[ ./packages/firefox.nix
./packages/btop.nix ./packages/git.nix
./packages/firefox.nix ./packages/hyprland.nix
./packages/git.nix ./packages/kitty.nix
./packages/hyprland.nix ./packages/mpv.nix
./packages/kitty.nix ./packages/neovim.nix
./packages/mpv.nix ./packages/other_apps.nix
./packages/neovim.nix ./packages/pass.nix
./packages/other_apps.nix ./packages/texlive.nix
./packages/pass.nix ./packages/thunderbird.nix
./packages/texlive.nix ./packages/tmux.nix
./packages/thunderbird.nix ./packages/zathura.nix
./packages/tmux.nix ./packages/zen.nix
./packages/zathura.nix ./packages/zsh.nix
./packages/zen.nix # dotfiles links
./packages/zsh.nix ./dotfiles_apps.nix
# dotfiles links ];
./dotfiles_apps.nix
];
} }

View file

@ -1,10 +1,15 @@
{ config, pkgs, inputs, ... }:
{ {
home.packages = with pkgs; [ config,
hyprpaper pkgs,
hyprlock inputs,
wl-clipboard ...
grim }:
slurp {
]; home.packages = with pkgs; [
hyprpaper
hyprlock
wl-clipboard
grim
slurp
];
} }

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
}; };
} }

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.mpv = { programs.mpv = {
enable = true; enable = true;
}; };
} }

View file

@ -1,43 +1,50 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim-unwrapped neovim-unwrapped
# outils dont lazy.nvim / les LSP ont besoin # outils dont lazy.nvim / les LSP ont besoin
ripgrep ripgrep
fd fd
gcc gcc
gnumake gnumake
nodejs nodejs
unzip unzip
# formatters généraux # formatters généraux
lua-language-server lua-language-server
stylua stylua
nil nil
nixfmt-rfc-style # binaire "nixfmt" pour conform nixfmt-rfc-style # binaire "nixfmt" pour conform
# LSP serveurs (remplacent Mason) # LSP serveurs (remplacent Mason)
marksman marksman
pyright pyright
# LSP que tu avais dans Mason — décommente selon besoin # LSP que tu avais dans Mason — décommente selon besoin
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
typescript-language-server # ts_ls typescript-language-server # ts_ls
vim-language-server # vimls vim-language-server # vimls
jdt-language-server # jdtls (Java) jdt-language-server # jdtls (Java)
# formatters / linters shell + python # formatters / linters shell + python
shellcheck shellcheck
shfmt shfmt
black black
isort isort
# vimtex forward search + treesitter CLI # vimtex forward search + treesitter CLI
xdotool xdotool
tree-sitter tree-sitter
(python3.withPackages (ps: with ps; [ pynvim debugpy ])) (python3.withPackages (
]; ps: with ps; [
home.sessionVariables.EDITOR = "nvim"; pynvim
home.shellAliases = { vi = "nvim"; vim = "nvim"; }; debugpy
# ~/.config/nvim -> tes dotfiles, éditables en place ]
xdg.configFile."nvim".source = ))
config.lib.file.mkOutOfStoreSymlink ];
"${config.home.homeDirectory}/nixos-config/dotfiles/nvim"; home.sessionVariables.EDITOR = "nvim";
home.shellAliases = {
vi = "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";
} }

View file

@ -1,60 +1,56 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
# --- Others # --- Others
hyfetch hyfetch
fastfetch fastfetch
pkg-config pkg-config
# --- Bureautique ---
# --- Bureautique --- libreoffice-fresh
libreoffice-fresh typora
typora zotero
zotero # --- Communication ---
signal-desktop
# --- Communication --- vesktop
signal-desktop mattermost-desktop
vesktop # --- Multimédia ---
mattermost-desktop gimp
inkscape
# --- Multimédia --- nomacs
gimp imagemagick
inkscape librsvg
nomacs streamlink
imagemagick kdePackages.gwenview
librsvg audacity
streamlink # --- Maths ---
kdePackages.gwenview (octave.withPackages (
audacity ps: with ps; [
image # octave-image
# --- Maths --- statistics # octave-statistics
(octave.withPackages (ps: with ps; [ symbolic # octave-symbolic
image # octave-image # dataframe # (octave-dataframe : indispo dans nixpkgs, à compiler via pkg si besoin)
statistics # octave-statistics ]
symbolic # octave-symbolic ))
# dataframe # (octave-dataframe : indispo dans nixpkgs, à compiler via pkg si besoin) gnuplot # gnuplot
])) # --- Gestion de fichiers KDE ---
gnuplot # gnuplot kdePackages.dolphin
kdePackages.dolphin-plugins
# --- Gestion de fichiers KDE --- kdePackages.kio-extras
kdePackages.dolphin kdePackages.qtsvg
kdePackages.dolphin-plugins kdePackages.ark
kdePackages.kio-extras kdePackages.kdegraphics-thumbnailers
kdePackages.qtsvg kdePackages.ffmpegthumbs
kdePackages.ark nwg-look
kdePackages.kdegraphics-thumbnailers papirus-icon-theme
kdePackages.ffmpegthumbs mako
cliphist
nwg-look grim
papirus-icon-theme slurp
mako mullvad-vpn
cliphist ];
grim slurp services.gpg-agent = {
mullvad-vpn enable = true;
]; pinentry.package = pkgs.pinentry-gnome3;
};
services.gpg-agent = { services.protonmail-bridge.enable = true;
enable = true;
pinentry.package = pkgs.pinentry-gnome3;
};
services.protonmail-bridge.enable = true;
} }

View file

@ -47,11 +47,9 @@
mullvad-vpn # GUI Mullvad (le service est côté système) mullvad-vpn # GUI Mullvad (le service est côté système)
]; ];
programs.gpg.enable = true; programs.gpg.enable = true;
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
pinentry.package = pkgs.pinentry-curses; pinentry.package = pkgs.pinentry-curses;
}; };
services.protonmail-bridge.enable = true; services.protonmail-bridge.enable = true;
} }

View file

@ -1,6 +1,6 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
programs.password-store = { programs.password-store = {
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,9 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.thunderbird = { programs.thunderbird = {
enable = true; enable = true;
profiles.default = { profiles.default = {
isDefault = true; isDefault = true;
}; };
}; };
} }

View file

@ -1,6 +1,6 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
}; };
} }

View file

@ -1,18 +1,17 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
options = { options = {
selection-clipboard = "clipboard"; selection-clipboard = "clipboard";
synctex = true; synctex = true;
synctex-edit-modifier = "ctrl"; synctex-edit-modifier = "ctrl";
}; };
mappings = { mappings = {
}; };
}; };
home.packages = with pkgs; [
home.packages = with pkgs; [ zathura
zathura poppler-utils
poppler-utils ];
];
} }

View file

@ -1,11 +1,15 @@
{ config, pkgs, inputs, ... }:
{ {
imports = [ inputs.zen-browser.homeModules.beta ]; config,
programs.zen-browser = { pkgs,
enable = true; inputs,
setAsDefaultBrowser = true; ...
profiles.default = { }; }:
}; {
stylix.targets.zen-browser.profileNames = [ "default" ]; imports = [ inputs.zen-browser.homeModules.beta ];
programs.zen-browser = {
enable = true;
setAsDefaultBrowser = true;
profiles.default = { };
};
stylix.targets.zen-browser.profileNames = [ "default" ];
} }

View file

@ -1,13 +1,16 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
theme = "robbyrussell"; theme = "robbyrussell";
plugins = [ "git" "sudo" ]; plugins = [
}; "git"
}; "sudo"
];
};
};
} }

View file

@ -1,7 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true; hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true; services.blueman.enable = true;
} }

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
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 = true;
configurationLimit = 10; configurationLimit = 10;
}; };
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
} }

View file

@ -1,37 +1,37 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
# driver proprietaire # driver proprietaire
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true; # nécessaire pour Steam / jeux 32-bit enable32Bit = true; # nécessaire pour Steam / jeux 32-bit
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver # VAAPI pour l'iGPU Intel (Coffee Lake) intel-media-driver # VAAPI pour l'iGPU Intel (Coffee Lake)
libva-vdpau-driver libva-vdpau-driver
libvdpau-va-gl libvdpau-va-gl
]; ];
}; };
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 # dGPU endormi en général, offload sinon
powerManagement.enable = true; powerManagement.enable = true;
# powerManagement.finegrained = true; # nécessite offload (ci-dessous) # powerManagement.finegrained = true; # nécessite offload (ci-dessous)
# RTX 2060 = Turing. Le driver "open" fonctionne pour Turing+, mais le # RTX 2060 = Turing. Le driver "open" fonctionne pour Turing+, mais le
# propriétaire reste plus mature sur cette génération. Garde `open = false`. # 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; # dGPU à la demande (meilleure autonomie)
# enableOffloadCmd = true; # fournit la commande `nvidia-offload` # enableOffloadCmd = true; # fournit la commande `nvidia-offload`
#}; #};
# nix shell nixpkgs#pciutils -c lspci -D -d ::03xx # 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";
}; };
}; };
} }

View file

@ -1,30 +1,30 @@
{ config, pkgs, ... }: { config, 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;
dedicatedServer.openFirewall = false; dedicatedServer.openFirewall = false;
}; };
programs.gamemode.enable = true; programs.gamemode.enable = true;
programs.gamescope = { programs.gamescope = {
enable = true; enable = true;
capSysNice = true; capSysNice = true;
}; };
zramSwap = { zramSwap = {
enable = true; enable = true;
algorithm = "zstd"; algorithm = "zstd";
memoryPercent = 50; memoryPercent = 50;
}; };
# ── Intégration KDE/Dolphin ── # ── Intégration KDE/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";
}; };
} }

View file

@ -1,37 +1,37 @@
{ config, pkgs, ... }: { { config, 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
]; ];
} }

View file

@ -1,15 +1,15 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
programs.hyprland = { programs.hyprland = {
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;
} }

View file

@ -1,20 +1,19 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
i18n.defaultLocale = "fr_FR.UTF-8";
i18n.defaultLocale = "fr_FR.UTF-8"; i18n.extraLocaleSettings = {
i18n.extraLocaleSettings = { LC_ADDRESS = "fr_FR.UTF-8";
LC_ADDRESS = "fr_FR.UTF-8"; LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8"; LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8"; LC_MONETARY = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8"; LC_NAME = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8"; LC_NUMERIC = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8"; LC_PAPER = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8"; LC_TELEPHONE = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8"; LC_TIME = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8"; };
}; console = {
console = { keyMap = "fr-latin1";
keyMap = "fr-latin1"; };
};
} }

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.tlp.enable = true; services.tlp.enable = true;
services.power-profiles-daemon.enable = false; services.power-profiles-daemon.enable = false;
services.asusd.enable = true; services.asusd.enable = true;
services.supergfxd.enable = false; services.supergfxd.enable = false;
} }

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
}; };
} }

View file

@ -1,30 +1,29 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
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";
size = 24; size = 24;
}; };
fonts = {
fonts = { monospace = {
monospace = { package = pkgs.nerd-fonts.jetbrains-mono;
package = pkgs.nerd-fonts.jetbrains-mono; name = "Noto Sans Mono";
name = "Noto Sans Mono"; };
}; sansSerif = {
sansSerif = { package = pkgs.texlivePackages.luciole;
package = pkgs.texlivePackages.luciole; name = "Luciole";
name = "Luciole"; };
}; sizes = {
sizes = { applications = 11;
applications = 11; terminal = 12;
terminal = 12; };
}; };
}; };
};
} }

View file

@ -1,23 +1,22 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
vim vim
gnumake gnumake
gcc gcc
wget wget
curl curl
unzip unzip
tree tree
ripgrep ripgrep
translate-shell translate-shell
xclip xclip
powertop powertop
brightnessctl brightnessctl
ntfs3g ntfs3g
pciutils pciutils
usbutils usbutils
inxi inxi
]; ];
} }

View file

@ -1,10 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
} }

View file

@ -1,18 +1,18 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
networking = { networking = {
hostName = "nixos-home"; hostName = "nixos-home";
networkmanager.enable = true; networkmanager.enable = true;
# open ports manually if needed # open ports manually if needed
firewall.enable = true; firewall.enable = true;
}; };
services = { services = {
xserver.xkb = { xserver.xkb = {
layout = "fr"; layout = "fr";
variant = ""; variant = "";
}; };
printing.enable = true; printing.enable = true;
openssh.enable = false; openssh.enable = false;
flatpak.enable = true; flatpak.enable = true;
}; };
} }

View file

@ -1,10 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
users.users.afoucaultc = { users.users.afoucaultc = {
isNormalUser = true; isNormalUser = true;
description = "afoucaultc"; description = "afoucaultc";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
shell = pkgs.zsh; "networkmanager"
}; "wheel"
programs.zsh.enable = true; ];
shell = pkgs.zsh;
};
programs.zsh.enable = true;
} }

View file

@ -1,32 +1,40 @@
{ config, pkgs, inputs, ... }:
{ {
imports = [ config,
# faire nixos-generate-config dans le bon dossier pkgs,
./hardware-configuration.nix inputs,
./config/bluetooth.nix ...
./config/boot.nix }:
./config/drivers_video.nix {
./config/extra-services.nix imports = [
./config/fonts.nix # faire nixos-generate-config dans le bon dossier
./config/hyprland.nix ./hardware-configuration.nix
./config/language.nix ./config/bluetooth.nix
./config/power_management.nix ./config/boot.nix
./config/sound.nix ./config/drivers_video.nix
./config/stylix.nix ./config/extra-services.nix
./config/system_packages.nix ./config/fonts.nix
./config/system_saves.nix ./config/hyprland.nix
./config/system_services.nix ./config/language.nix
./config/user.nix ./config/power_management.nix
# profil nixos pour mon ordi portable ./config/sound.nix
# nécessite l'input nixos-hardware dans flake.nix. ./config/stylix.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel ./config/system_packages.nix
inputs.nixos-hardware.nixosModules.common-pc-laptop ./config/system_saves.nix
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd ./config/system_services.nix
]; ./config/user.nix
nix.settings.experimental-features = [ "nix-command" "flakes" ]; # profil nixos pour mon ordi portable
nixpkgs.config.allowUnfree = true; # nécessite l'input nixos-hardware dans flake.nix.
#nixpkgs.config.permittedInsecurePackages = [ inputs.nixos-hardware.nixosModules.common-cpu-intel
# "pnpm-10.29.2" inputs.nixos-hardware.nixosModules.common-pc-laptop
#]; inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
system.stateVersion = "25.11"; ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
#nixpkgs.config.permittedInsecurePackages = [
# "pnpm-10.29.2"
#];
system.stateVersion = "25.11";
} }

View file

@ -1,36 +1,48 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; ...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/mapper/luks-eddcceff-290e-478d-baef-3fdc0f47a220"; device = "/dev/mapper/luks-eddcceff-290e-478d-baef-3fdc0f47a220";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-eddcceff-290e-478d-baef-3fdc0f47a220".device =
boot.initrd.luks.devices."luks-eddcceff-290e-478d-baef-3fdc0f47a220".device = "/dev/disk/by-uuid/eddcceff-290e-478d-baef-3fdc0f47a220"; "/dev/disk/by-uuid/eddcceff-290e-478d-baef-3fdc0f47a220";
boot.initrd.luks.devices."luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c".device = "/dev/disk/by-uuid/5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c"; boot.initrd.luks.devices."luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c".device =
"/dev/disk/by-uuid/5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/2A23-C86E"; device = "/dev/disk/by-uuid/2A23-C86E";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
swapDevices =
[ { device = "/dev/mapper/luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c"; }
]; ];
};
swapDevices = [
{ device = "/dev/mapper/luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,7 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true; hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true; services.blueman.enable = true;
} }

View file

@ -1,13 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
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; configurationLimit = 5;
configurationLimit = 5; };
}; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.canTouchEfiVariables = true;
} }

View file

@ -1,15 +1,14 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver # VAAPI moderne pour Skylake (iHD) intel-media-driver # VAAPI moderne pour Skylake (iHD)
intel-vaapi-driver # ancien driver i965 (fallback) intel-vaapi-driver # ancien driver i965 (fallback)
libvdpau-va-gl libvdpau-va-gl
]; ];
}; };
environment.sessionVariables = {
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD";
LIBVA_DRIVER_NAME = "iHD"; };
};
} }

View file

@ -1,14 +1,14 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
# ── Mullvad VPN ── (remplace mullvad-vpn-bin de l'AUR) # ── Mullvad VPN ── (remplace mullvad-vpn-bin de l'AUR)
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 (miniatures, montage…) ──
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";
}; };
} }

View file

@ -1,37 +1,30 @@
{ config, pkgs, ... }: { { config, 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)
corefonts
# Microsoft / Windows (ttf-ms-fonts + corefonts) vista-fonts # tahoma, etc. (unfree)
corefonts # Latin Modern / TeX Gyre (otf-latin-modern, tex-gyre-math)
vista-fonts # tahoma, etc. (unfree) lmodern
gyre-fonts
# Latin Modern / TeX Gyre (otf-latin-modern, tex-gyre-math) # Accessibilité (ttf-luciole)
lmodern texlivePackages.luciole
gyre-fonts # Nerd fonts / symboles (ttf-nerd-fonts-symbols, font-awesome, woff2-font-awesome)
nerd-fonts.symbols-only
# Accessibilité (ttf-luciole) font-awesome
texlivePackages.luciole # Fontes de code utiles
fira-code
# Nerd fonts / symboles (ttf-nerd-fonts-symbols, font-awesome, woff2-font-awesome) jetbrains-mono
nerd-fonts.symbols-only dejavu_fonts
font-awesome liberation_ttf
];
# Fontes de code utiles
fira-code
jetbrains-mono
dejavu_fonts
liberation_ttf
];
} }

View file

@ -1,15 +1,13 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
programs.hyprland = { programs.hyprland = {
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;
} }

View file

@ -1,20 +1,19 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
i18n.defaultLocale = "fr_FR.UTF-8";
i18n.defaultLocale = "fr_FR.UTF-8"; i18n.extraLocaleSettings = {
i18n.extraLocaleSettings = { LC_ADDRESS = "fr_FR.UTF-8";
LC_ADDRESS = "fr_FR.UTF-8"; LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8"; LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8"; LC_MONETARY = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8"; LC_NAME = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8"; LC_NUMERIC = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8"; LC_PAPER = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8"; LC_TELEPHONE = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8"; LC_TIME = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8"; };
}; console = {
console = { keyMap = "fr-latin1";
keyMap = "fr-latin1"; };
};
} }

View file

@ -1,71 +1,75 @@
{ config, pkgs, lib, ... }:
{ {
# ───────────────────────────────────────────────────────────── config,
# Machine à faible RAM (4 GiB) : on privilégie TOUJOURS les pkgs,
# binaires pré-compilés (caches) plutôt que la compilation locale. lib,
# ───────────────────────────────────────────────────────────── ...
nix.settings = { }:
experimental-features = [ "nix-command" "flakes" ]; {
# ─────────────────────────────────────────────────────────────
# Caches binaires : on récupère un maximum de paquets déjà # Machine à faible RAM (4 GiB) : on privilégie TOUJOURS les
# compilés pour éviter de compiler sur cette machine. # binaires pré-compilés (caches) plutôt que la compilation locale.
substituters = [ # ─────────────────────────────────────────────────────────────
"https://cache.nixos.org" nix.settings = {
"https://hyprland.cachix.org" experimental-features = [
"https://nix-community.cachix.org" "nix-command"
]; "flakes"
trusted-substituters = [ ];
"https://cache.nixos.org" # Caches binaires : on récupère un maximum de paquets déjà
"https://hyprland.cachix.org" # compilés pour éviter de compiler sur cette machine.
"https://nix-community.cachix.org" substituters = [
]; "https://cache.nixos.org"
trusted-public-keys = [ "https://hyprland.cachix.org"
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "https://nix-community.cachix.org"
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" trusted-substituters = [
]; "https://cache.nixos.org"
trusted-users = [ "root" "@wheel" ]; "https://hyprland.cachix.org"
"https://nix-community.cachix.org"
# Toujours interroger les caches, ne jamais partir du principe ];
# qu'un paquet doit être compilé localement. trusted-public-keys = [
builders-use-substitutes = true; "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
fallback = true; # si un cache tombe, on tente ailleurs "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
connect-timeout = 10; "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# Limiter la pression mémoire pendant la construction : trusted-users = [
# peu de jobs en parallèle, sinon 4 Gio saturent vite. "root"
max-jobs = 1; # une dérivation à la fois "@wheel"
cores = 2; # les 2 cœurs du i5-6200U par job ];
}; # Toujours interroger les caches, ne jamais partir du principe
# qu'un paquet doit être compilé localement.
# Auto-optimisation du store (déduplication) pour économiser le disque. builders-use-substitutes = true;
nix.settings.auto-optimise-store = true; fallback = true; # si un cache tombe, on tente ailleurs
connect-timeout = 10;
# ───────────────────────────────────────────────────────────── # Limiter la pression mémoire pendant la construction :
# zram : swap compressé en RAM. Indispensable avec 4 Gio, à la # peu de jobs en parallèle, sinon 4 Gio saturent vite.
# fois pour l'usage courant et pour absorber les pics du rebuild. max-jobs = 1; # une dérivation à la fois
# ───────────────────────────────────────────────────────────── cores = 2; # les 2 cœurs du i5-6200U par job
zramSwap = { };
enable = true; # Auto-optimisation du store (déduplication) pour économiser le disque.
algorithm = "zstd"; nix.settings.auto-optimise-store = true;
memoryPercent = 150; # jusqu'à 1.5x la RAM (zstd compresse ~3:1) # ─────────────────────────────────────────────────────────────
priority = 100; # zram : swap compressé en RAM. Indispensable avec 4 Gio, à la
}; # fois pour l'usage courant et pour absorber les pics du rebuild.
# ─────────────────────────────────────────────────────────────
# Le noyau peut « swaper » agressivement vers zram (rapide) plutôt zramSwap = {
# que de tuer des process pendant un build. enable = true;
boot.kernel.sysctl = { algorithm = "zstd";
"vm.swappiness" = 180; # favorise zram memoryPercent = 150; # jusqu'à 1.5x la RAM (zstd compresse ~3:1)
"vm.watermark_boost_factor" = 0; priority = 100;
"vm.watermark_scale_factor" = 125; };
"vm.page-cluster" = 0; # recommandé avec zram # Le noyau peut « swaper » agressivement vers zram (rapide) plutôt
}; # que de tuer des process pendant un build.
boot.kernel.sysctl = {
# earlyoom : tue proprement le process le plus gourmand avant que la "vm.swappiness" = 180; # favorise zram
# machine ne se fige totalement (utile si un build déborde malgré tout). "vm.watermark_boost_factor" = 0;
services.earlyoom = { "vm.watermark_scale_factor" = 125;
enable = true; "vm.page-cluster" = 0; # recommandé avec zram
freeMemThreshold = 5; # agit quand il reste < 5% de RAM libre };
freeSwapThreshold = 5; # earlyoom : tue proprement le process le plus gourmand avant que la
}; # machine ne se fige totalement (utile si un build déborde malgré tout).
services.earlyoom = {
enable = true;
freeMemThreshold = 5; # agit quand il reste < 5% de RAM libre
freeSwapThreshold = 5;
};
} }

View file

@ -1,20 +1,19 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
# ThinkPad E560 : TLP pour l'autonomie. Pas d'asusd (spécifique ASUS). # 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). # Seuils de charge batterie (préserve la batterie).
# Fonctionne sur la plupart des ThinkPad via tp_smapi/acpi. # 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.
# Économie d'énergie supplémentaire. powerManagement.enable = true;
powerManagement.enable = true;
} }

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
}; };
} }

View file

@ -1,30 +1,28 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
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"; size = 24;
size = 24; };
}; fonts = {
monospace = {
fonts = { package = pkgs.nerd-fonts.jetbrains-mono;
monospace = { name = "Noto Sans Mono";
package = pkgs.nerd-fonts.jetbrains-mono; };
name = "Noto Sans Mono"; sansSerif = {
}; package = pkgs.texlivePackages.luciole;
sansSerif = { name = "Luciole";
package = pkgs.texlivePackages.luciole; };
name = "Luciole"; sizes = {
}; applications = 11;
sizes = { terminal = 12;
applications = 11; };
terminal = 12; };
}; };
};
};
} }

View file

@ -1,23 +1,22 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
vim vim
gnumake gnumake
gcc gcc
wget wget
curl curl
unzip unzip
tree tree
ripgrep ripgrep
translate-shell translate-shell
xclip xclip
powertop powertop
brightnessctl brightnessctl
ntfs3g ntfs3g
pciutils pciutils
usbutils usbutils
inxi inxi
]; ];
} }

View file

@ -1,10 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
} }

View file

@ -1,19 +1,19 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
networking = { networking = {
hostName = "nixos-laptop"; hostName = "nixos-laptop";
networkmanager.enable = true; networkmanager.enable = true;
# ouvrir des ports manuellement si besoin # ouvrir des ports manuellement si besoin
firewall.enable = true; firewall.enable = true;
}; };
services = { services = {
xserver.xkb = { xserver.xkb = {
layout = "fr"; layout = "fr";
variant = ""; variant = "";
}; };
printing.enable = true; printing.enable = true;
openssh.enable = false; openssh.enable = false;
flatpak.enable = true; flatpak.enable = true;
fprintd.enable = true; fprintd.enable = true;
}; };
} }

View file

@ -1,10 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
users.users.afoucaultc = { users.users.afoucaultc = {
isNormalUser = true; isNormalUser = true;
description = "afoucaultc"; description = "afoucaultc";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
shell = pkgs.zsh; "networkmanager"
}; "wheel"
programs.zsh.enable = true; ];
shell = pkgs.zsh;
};
programs.zsh.enable = true;
} }

View file

@ -1,32 +1,37 @@
{ config, pkgs, inputs, ... }:
{ {
imports = [ config,
# généré à l'installation avec nixos-generate-config pkgs,
./hardware-configuration.nix inputs,
./config/bluetooth.nix ...
./config/boot.nix }:
./config/drivers_video.nix {
./config/extra-services.nix imports = [
./config/fonts.nix # généré à l'installation avec nixos-generate-config
./config/hyprland.nix ./hardware-configuration.nix
./config/language.nix ./config/bluetooth.nix
./config/low-ram.nix ./config/boot.nix
./config/power_management.nix ./config/drivers_video.nix
./config/sound.nix ./config/extra-services.nix
./config/stylix.nix ./config/fonts.nix
./config/system_packages.nix ./config/hyprland.nix
./config/system_saves.nix ./config/language.nix
./config/system_services.nix ./config/low-ram.nix
./config/user.nix ./config/power_management.nix
# profil nixos-hardware pour le ThinkPad E560 (Skylake, i5-6200U) ./config/sound.nix
# nécessite l'input nixos-hardware dans flake.nix. ./config/stylix.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel ./config/system_packages.nix
inputs.nixos-hardware.nixosModules.common-pc-laptop ./config/system_saves.nix
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd ./config/system_services.nix
]; ./config/user.nix
nixpkgs.config.allowUnfree = true; # profil nixos-hardware pour le ThinkPad E560 (Skylake, i5-6200U)
system.stateVersion = "25.11"; # nécessite l'input nixos-hardware dans flake.nix.
nixpkgs.config.permittedInsecurePackages = [ inputs.nixos-hardware.nixosModules.common-cpu-intel
"electron-39.8.10" inputs.nixos-hardware.nixosModules.common-pc-laptop
]; inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
];
nixpkgs.config.allowUnfree = true;
system.stateVersion = "25.11";
nixpkgs.config.permittedInsecurePackages = [
"electron-39.8.10"
];
} }

View file

@ -1,32 +1,54 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sr_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/mapper/cryptroot"; device = "/dev/mapper/cryptroot";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/b773a1eb-b293-4498-9090-a26843bdcd5f"; boot.initrd.luks.devices."cryptroot".device =
"/dev/disk/by-uuid/b773a1eb-b293-4498-9090-a26843bdcd5f";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/6EA9-3F92"; device = "/dev/disk/by-uuid/6EA9-3F92";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
}; "fmask=0022"
"dmask=0022"
];
};
swapDevices = [ { device = "/swapfile"; size = 8192; } ]; swapDevices = [
{
device = "/swapfile";
size = 8192;
}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;