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,12 +1,12 @@
{ config, pkgs, ... }:
{ config, pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
configurationLimit = 10;
};
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
configurationLimit = 10;
};
boot.loader.efi.canTouchEfiVariables = true;
}

View file

@ -1,37 +1,37 @@
{ config, pkgs, ... }:
{ config, pkgs, ... }:
{
# driver proprietaire
services.xserver.videoDrivers = [ "nvidia" ];
# driver proprietaire
services.xserver.videoDrivers = [ "nvidia" ];
hardware.graphics = {
enable = true;
enable32Bit = true; # nécessaire pour Steam / jeux 32-bit
extraPackages = with pkgs; [
intel-media-driver # VAAPI pour l'iGPU Intel (Coffee Lake)
libva-vdpau-driver
libvdpau-va-gl
];
};
hardware.graphics = {
enable = true;
enable32Bit = true; # nécessaire pour Steam / jeux 32-bit
extraPackages = with pkgs; [
intel-media-driver # VAAPI pour l'iGPU Intel (Coffee Lake)
libva-vdpau-driver
libvdpau-va-gl
];
};
hardware.nvidia = {
modesetting.enable = true; # requis pour Wayland/Hyprland
# dGPU endormi en général, offload sinon
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. Garde `open = false`.
open = false;
nvidiaSettings = true; # fournit `nvidia-settings`
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
sync.enable = true;
#offload = {
# enable = true; # dGPU à la demande (meilleure autonomie)
# enableOffloadCmd = true; # fournit la commande `nvidia-offload`
#};
# nix shell nixpkgs#pciutils -c lspci -D -d ::03xx
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
hardware.nvidia = {
modesetting.enable = true; # requis pour Wayland/Hyprland
# dGPU endormi en général, offload sinon
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. Garde `open = false`.
open = false;
nvidiaSettings = true; # fournit `nvidia-settings`
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
sync.enable = true;
#offload = {
# enable = true; # dGPU à la demande (meilleure autonomie)
# enableOffloadCmd = true; # fournit la commande `nvidia-offload`
#};
# nix shell nixpkgs#pciutils -c lspci -D -d ::03xx
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

View file

@ -1,30 +1,30 @@
{ config, pkgs, ... }:
{
# ── Mullvad VPN ──
services.mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
# ── Steam ──
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
};
programs.gamemode.enable = true;
programs.gamescope = {
enable = true;
capSysNice = true;
};
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 50;
};
# ── Intégration KDE/Dolphin ──
services.gvfs.enable = true;
services.tumbler.enable = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
# ── Mullvad VPN ──
services.mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
# ── Steam ──
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
};
programs.gamemode.enable = true;
programs.gamescope = {
enable = true;
capSysNice = true;
};
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 50;
};
# ── Intégration KDE/Dolphin ──
services.gvfs.enable = true;
services.tumbler.enable = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
}

View file

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

View file

@ -1,15 +1,15 @@
{ pkgs, inputs, ... }:
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
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 ];
};
# 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;
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,7 +1,7 @@
{ config, pkgs, ... }:
{
services.tlp.enable = true;
services.power-profiles-daemon.enable = false;
services.asusd.enable = true;
services.supergfxd.enable = false;
services.tlp.enable = true;
services.power-profiles-daemon.enable = false;
services.asusd.enable = true;
services.supergfxd.enable = false;
}

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,29 @@
{ pkgs, ... }:
{
stylix = {
enable = true;
targets.gtksourceview.enable = false;
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
polarity = "dark";
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;
};
};
};
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,18 +1,18 @@
{ config, pkgs, ... }:
{
networking = {
hostName = "nixos-home";
networkmanager.enable = true;
# open ports manually if needed
firewall.enable = true;
};
services = {
xserver.xkb = {
layout = "fr";
variant = "";
};
printing.enable = true;
openssh.enable = false;
flatpak.enable = true;
};
networking = {
hostName = "nixos-home";
networkmanager.enable = true;
# open ports manually if needed
firewall.enable = true;
};
services = {
xserver.xkb = {
layout = "fr";
variant = "";
};
printing.enable = true;
openssh.enable = false;
flatpak.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;
}

View file

@ -1,32 +1,40 @@
{ config, pkgs, inputs, ... }:
{
imports = [
# faire nixos-generate-config dans le bon dossier
./hardware-configuration.nix
./config/bluetooth.nix
./config/boot.nix
./config/drivers_video.nix
./config/extra-services.nix
./config/fonts.nix
./config/hyprland.nix
./config/language.nix
./config/power_management.nix
./config/sound.nix
./config/stylix.nix
./config/system_packages.nix
./config/system_saves.nix
./config/system_services.nix
./config/user.nix
# profil nixos pour mon ordi portable
# nécessite l'input nixos-hardware dans flake.nix.
inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
#nixpkgs.config.permittedInsecurePackages = [
# "pnpm-10.29.2"
#];
system.stateVersion = "25.11";
config,
pkgs,
inputs,
...
}:
{
imports = [
# faire nixos-generate-config dans le bon dossier
./hardware-configuration.nix
./config/bluetooth.nix
./config/boot.nix
./config/drivers_video.nix
./config/extra-services.nix
./config/fonts.nix
./config/hyprland.nix
./config/language.nix
./config/power_management.nix
./config/sound.nix
./config/stylix.nix
./config/system_packages.nix
./config/system_saves.nix
./config/system_services.nix
./config/user.nix
# profil nixos pour mon ordi portable
# nécessite l'input nixos-hardware dans flake.nix.
inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
];
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
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/luks-eddcceff-290e-478d-baef-3fdc0f47a220";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-eddcceff-290e-478d-baef-3fdc0f47a220".device = "/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";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2A23-C86E";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/mapper/luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c"; }
fileSystems."/" = {
device = "/dev/mapper/luks-eddcceff-290e-478d-baef-3fdc0f47a220";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-eddcceff-290e-478d-baef-3fdc0f47a220".device =
"/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";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2A23-C86E";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
{ device = "/dev/mapper/luks-5f5524e7-c2c0-4cbd-91f2-37b8fe69a62c"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
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.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;
}

View file

@ -1,32 +1,37 @@
{ config, pkgs, inputs, ... }:
{
imports = [
# généré à l'installation avec nixos-generate-config
./hardware-configuration.nix
./config/bluetooth.nix
./config/boot.nix
./config/drivers_video.nix
./config/extra-services.nix
./config/fonts.nix
./config/hyprland.nix
./config/language.nix
./config/low-ram.nix
./config/power_management.nix
./config/sound.nix
./config/stylix.nix
./config/system_packages.nix
./config/system_saves.nix
./config/system_services.nix
./config/user.nix
# profil nixos-hardware pour le ThinkPad E560 (Skylake, i5-6200U)
# nécessite l'input nixos-hardware dans flake.nix.
inputs.nixos-hardware.nixosModules.common-cpu-intel
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"
];
config,
pkgs,
inputs,
...
}:
{
imports = [
# généré à l'installation avec nixos-generate-config
./hardware-configuration.nix
./config/bluetooth.nix
./config/boot.nix
./config/drivers_video.nix
./config/extra-services.nix
./config/fonts.nix
./config/hyprland.nix
./config/language.nix
./config/low-ram.nix
./config/power_management.nix
./config/sound.nix
./config/stylix.nix
./config/system_packages.nix
./config/system_saves.nix
./config/system_services.nix
./config/user.nix
# profil nixos-hardware pour le ThinkPad E560 (Skylake, i5-6200U)
# nécessite l'input nixos-hardware dans flake.nix.
inputs.nixos-hardware.nixosModules.common-cpu-intel
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
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(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.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/cryptroot";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/mapper/cryptroot";
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" =
{ device = "/dev/disk/by-uuid/6EA9-3F92";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6EA9-3F92";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ { device = "/swapfile"; size = 8192; } ];
swapDevices = [
{
device = "/swapfile";
size = 8192;
}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;