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

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

View file

@ -1,13 +1,12 @@
{ config, pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages;
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
configurationLimit = 5;
};
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages;
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
configurationLimit = 5;
};
boot.loader.efi.canTouchEfiVariables = true;
}

View file

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

View file

@ -1,14 +1,14 @@
{ config, pkgs, ... }:
{
# ── Mullvad VPN ── (remplace mullvad-vpn-bin de l'AUR)
services.mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
# ── Intégration gestionnaire de fichiers (miniatures, montage…) ──
services.gvfs.enable = true;
services.tumbler.enable = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
# ── Mullvad VPN ── (remplace mullvad-vpn-bin de l'AUR)
services.mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
# ── Intégration gestionnaire de fichiers (miniatures, montage…) ──
services.gvfs.enable = true;
services.tumbler.enable = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
}

View file

@ -1,37 +1,30 @@
{ config, pkgs, ... }: {
fonts.packages = with pkgs; [
# Sans / Source (adobe-source-*-fonts, source-han-sans)
source-sans
source-serif
source-han-sans # adobe-source-han-sans-otc-fonts
source-han-serif
# Noto + emoji + CJK (noto-fonts-cjk, noto-fonts-emoji)
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
# Microsoft / Windows (ttf-ms-fonts + corefonts)
corefonts
vista-fonts # tahoma, etc. (unfree)
# Latin Modern / TeX Gyre (otf-latin-modern, tex-gyre-math)
lmodern
gyre-fonts
# Accessibilité (ttf-luciole)
texlivePackages.luciole
# Nerd fonts / symboles (ttf-nerd-fonts-symbols, font-awesome, woff2-font-awesome)
nerd-fonts.symbols-only
font-awesome
# Fontes de code utiles
fira-code
jetbrains-mono
dejavu_fonts
liberation_ttf
];
fonts.packages = with pkgs; [
# Sans / Source (adobe-source-*-fonts, source-han-sans)
source-sans
source-serif
source-han-sans # adobe-source-han-sans-otc-fonts
source-han-serif
# Noto + emoji + CJK (noto-fonts-cjk, noto-fonts-emoji)
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
# Microsoft / Windows (ttf-ms-fonts + corefonts)
corefonts
vista-fonts # tahoma, etc. (unfree)
# Latin Modern / TeX Gyre (otf-latin-modern, tex-gyre-math)
lmodern
gyre-fonts
# Accessibilité (ttf-luciole)
texlivePackages.luciole
# Nerd fonts / symboles (ttf-nerd-fonts-symbols, font-awesome, woff2-font-awesome)
nerd-fonts.symbols-only
font-awesome
# Fontes de code utiles
fira-code
jetbrains-mono
dejavu_fonts
liberation_ttf
];
}

View file

@ -1,15 +1,13 @@
{ pkgs, inputs, ... }:
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
# Portails XDG (captures d'écran, partage d'écran, file pickers Wayland)
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
security.polkit.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
# Portails XDG (captures d'écran, partage d'écran, file pickers Wayland)
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
security.polkit.enable = true;
}

View file

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

View file

@ -1,71 +1,75 @@
{ config, 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 = {
experimental-features = [ "nix-command" "flakes" ];
# Caches binaires : on récupère un maximum de paquets déjà
# compilés pour éviter de compiler sur cette machine.
substituters = [
"https://cache.nixos.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
];
trusted-substituters = [
"https://cache.nixos.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-users = [ "root" "@wheel" ];
# Toujours interroger les caches, ne jamais partir du principe
# qu'un paquet doit être compilé localement.
builders-use-substitutes = true;
fallback = true; # si un cache tombe, on tente ailleurs
connect-timeout = 10;
# Limiter la pression mémoire pendant la construction :
# peu de jobs en parallèle, sinon 4 Gio saturent vite.
max-jobs = 1; # une dérivation à la fois
cores = 2; # les 2 cœurs du i5-6200U par job
};
# Auto-optimisation du store (déduplication) pour économiser le disque.
nix.settings.auto-optimise-store = true;
# ─────────────────────────────────────────────────────────────
# zram : swap compressé en RAM. Indispensable avec 4 Gio, à la
# fois pour l'usage courant et pour absorber les pics du rebuild.
# ─────────────────────────────────────────────────────────────
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 150; # jusqu'à 1.5x la RAM (zstd compresse ~3:1)
priority = 100;
};
# Le noyau peut « swaper » agressivement vers zram (rapide) plutôt
# que de tuer des process pendant un build.
boot.kernel.sysctl = {
"vm.swappiness" = 180; # favorise zram
"vm.watermark_boost_factor" = 0;
"vm.watermark_scale_factor" = 125;
"vm.page-cluster" = 0; # recommandé avec zram
};
# 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;
};
config,
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 = {
experimental-features = [
"nix-command"
"flakes"
];
# Caches binaires : on récupère un maximum de paquets déjà
# compilés pour éviter de compiler sur cette machine.
substituters = [
"https://cache.nixos.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
];
trusted-substituters = [
"https://cache.nixos.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-users = [
"root"
"@wheel"
];
# Toujours interroger les caches, ne jamais partir du principe
# qu'un paquet doit être compilé localement.
builders-use-substitutes = true;
fallback = true; # si un cache tombe, on tente ailleurs
connect-timeout = 10;
# Limiter la pression mémoire pendant la construction :
# peu de jobs en parallèle, sinon 4 Gio saturent vite.
max-jobs = 1; # une dérivation à la fois
cores = 2; # les 2 cœurs du i5-6200U par job
};
# Auto-optimisation du store (déduplication) pour économiser le disque.
nix.settings.auto-optimise-store = true;
# ─────────────────────────────────────────────────────────────
# zram : swap compressé en RAM. Indispensable avec 4 Gio, à la
# fois pour l'usage courant et pour absorber les pics du rebuild.
# ─────────────────────────────────────────────────────────────
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 150; # jusqu'à 1.5x la RAM (zstd compresse ~3:1)
priority = 100;
};
# Le noyau peut « swaper » agressivement vers zram (rapide) plutôt
# que de tuer des process pendant un build.
boot.kernel.sysctl = {
"vm.swappiness" = 180; # favorise zram
"vm.watermark_boost_factor" = 0;
"vm.watermark_scale_factor" = 125;
"vm.page-cluster" = 0; # recommandé avec zram
};
# 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, ... }:
{
# ThinkPad E560 : TLP pour l'autonomie. Pas d'asusd (spécifique ASUS).
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
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;
STOP_CHARGE_THRESH_BAT0 = 80;
};
};
services.power-profiles-daemon.enable = false;
# Économie d'énergie supplémentaire.
powerManagement.enable = true;
# ThinkPad E560 : TLP pour l'autonomie. Pas d'asusd (spécifique ASUS).
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
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;
STOP_CHARGE_THRESH_BAT0 = 80;
};
};
services.power-profiles-daemon.enable = false;
# Économie d'énergie supplémentaire.
powerManagement.enable = true;
}

View file

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

View file

@ -1,30 +1,28 @@
{ pkgs, ... }:
{
stylix = {
enable = true;
targets.gtksourceview.enable = false;
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
polarity = "dark";
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "Noto Sans Mono";
};
sansSerif = {
package = pkgs.texlivePackages.luciole;
name = "Luciole";
};
sizes = {
applications = 11;
terminal = 12;
};
};
};
stylix = {
enable = true;
targets.gtksourceview.enable = false;
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
polarity = "dark";
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "Noto Sans Mono";
};
sansSerif = {
package = pkgs.texlivePackages.luciole;
name = "Luciole";
};
sizes = {
applications = 11;
terminal = 12;
};
};
};
}

View file

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

View file

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

View file

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

View file

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