adapt work pc
This commit is contained in:
parent
4898f5cc5f
commit
dca271648e
54 changed files with 126 additions and 847 deletions
|
|
@ -13,6 +13,7 @@
|
|||
printing.enable = true;
|
||||
openssh.enable = false;
|
||||
flatpak.enable = true;
|
||||
fprintd.enable = true;
|
||||
};
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
||||
5
hosts/common/niri.nix
Normal file
5
hosts/common/niri.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.niri;
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# grub utilisé pour le bootloader
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.niri.enable = true;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.gvfs.enable = true;
|
||||
services.tumbler.enable = true;
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
}
|
||||
|
|
@ -4,31 +4,31 @@
|
|||
# généré à l'installation avec nixos-generate-config
|
||||
# à copier dans le dossier courant depuis /etc/nixos
|
||||
./hardware-configuration.nix
|
||||
# machine spécifique
|
||||
./config/boot.nix
|
||||
./config/drivers_video.nix
|
||||
./config/power-management.nix
|
||||
# ensemble de packages et configurations système
|
||||
./config/basesystem/bluetooth.nix
|
||||
./config/basesystem/boot.nix
|
||||
./config/basesystem/drivers_video.nix
|
||||
./config/basesystem/language.nix
|
||||
./config/basesystem/memory.nix
|
||||
./config/basesystem/system.nix
|
||||
./config/basesystem/system_saves.nix
|
||||
./config/basesystem/users.nix
|
||||
../common/basesystem/bluetooth.nix
|
||||
../common/basesystem/language.nix
|
||||
../common/basesystem/memory.nix
|
||||
../common/basesystem/system.nix
|
||||
../common/basesystem/system_saves.nix
|
||||
../common/basesystem/users.nix
|
||||
# style
|
||||
./config/style/fonts.nix
|
||||
./config/style/stylix.nix
|
||||
../common/style/fonts.nix
|
||||
../common/style/stylix.nix
|
||||
# additional services
|
||||
./config/services/gnome-keyring.nix
|
||||
./config/services/kde.nix
|
||||
./config/services/mullvad.nix
|
||||
./config/services/power_management.nix
|
||||
./config/services/sound.nix
|
||||
../common/services/gnome-keyring.nix
|
||||
../common/services/mullvad.nix
|
||||
../common/services/sound.nix
|
||||
# programs
|
||||
./config/programs/gamescope.nix
|
||||
./config/programs/steam.nix
|
||||
../common/programs/gamescope.nix
|
||||
../common/programs/steam.nix
|
||||
# packages & others
|
||||
./config/hyprland.nix
|
||||
./config/wayland.nix
|
||||
./config/system_packages.nix
|
||||
../common/niri.nix
|
||||
../common/wayland.nix
|
||||
../common/system_packages.nix
|
||||
# profil nixos pour mon ordi portable maison
|
||||
# nécessite l'input nixos-hardware dans flake.nix.
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel # active le microcode intel, KMS pour GPU intégré, etc...
|
||||
|
|
@ -43,15 +43,10 @@
|
|||
# ne pas toucher, défini une seule fois en fonction de la version de nixos de l'ISO pour la 1ère installation
|
||||
system.stateVersion = "25.11";
|
||||
# nécessaire pour permettre des dépendances problématiques parfois
|
||||
#nixpkgs.config.permittedInsecurePackages = [
|
||||
# "electron-39.8.10"
|
||||
#];
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
streamlink = prev.streamlink.overridePythonAttrs (old: {
|
||||
doCheck = false;
|
||||
# or, to skip just the one test:
|
||||
# disabledTests = (old.disabledTests or []) ++ [ "test_read_timeout" ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
# Host `nixos-laptop` — ThinkPad E560
|
||||
|
||||
Profil **léger et faible RAM (4 Gio)** : i5-6200U, Intel HD 520 (pas de GPU dédié)
|
||||
|
||||
## Faible RAM — ce qui est en place (`config/low-ram.nix`)
|
||||
- `max-jobs = 1`, `cores = 2` : on ne sature pas les 4 Gio pendant un build.
|
||||
- `builders-use-substitutes`, `fallback`, 3 caches binaires : on télécharge
|
||||
du pré-compilé au lieu de compiler.
|
||||
- `zramSwap` 150 % en zstd + `vm.swappiness = 180` : swap compressé rapide.
|
||||
- `earlyoom` : tue proprement le process le plus gourmand avant un freeze total.
|
||||
|
||||
### Si un rebuild rame quand même
|
||||
Un paquet absent des caches sera compilé localement. Deux options :
|
||||
1. Éviter les inputs qui forcent la compilation
|
||||
2. Créer son propre cache Cachix et y pousser depuis le poste maison :
|
||||
```bash
|
||||
# sur le poste maison, après un build :
|
||||
cachix push mon-cache ./result
|
||||
```
|
||||
puis ajouter `https://mon-cache.cachix.org` aux `substituters` de `config/low-ram.nix`. Le laptop récupèrera alors les binaires sans compiler.
|
||||
|
||||
## Empreinte digitale
|
||||
`services.fprintd.enable = true`. `fprintd-enroll` après install.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# mullvad VPN
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
# intégration gestionnaire de fichiers (pour Dolphin)
|
||||
#services.gvfs.enable = true;
|
||||
#services.tumbler.enable = true;
|
||||
#environment.sessionVariables = {
|
||||
# NIXOS_OZONE_WL = "1";
|
||||
#};
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{ 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;
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# style global
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
gnumake
|
||||
gcc
|
||||
wget
|
||||
curl
|
||||
unzip
|
||||
tree
|
||||
ripgrep
|
||||
translate-shell
|
||||
xclip
|
||||
powertop
|
||||
brightnessctl
|
||||
ntfs3g
|
||||
pciutils
|
||||
usbutils
|
||||
inxi
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = "nixos-laptop";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
services = {
|
||||
xserver.xkb = {
|
||||
layout = "fr";
|
||||
variant = "";
|
||||
};
|
||||
printing.enable = true;
|
||||
openssh.enable = false;
|
||||
flatpak.enable = true;
|
||||
fprintd.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.afoucaultc = {
|
||||
isNormalUser = true;
|
||||
description = "afoucaultc";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
pam.services.hyprlock = { };
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
services.graphical-desktop.enable = true;
|
||||
|
||||
services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkDefault true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIITfGmwGaMwaOAd6DDeaU="
|
||||
];
|
||||
};
|
||||
|
||||
security.wrappers.Hyprland = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_sys_nice+ep";
|
||||
source = lib.getExe inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
};
|
||||
}
|
||||
|
|
@ -4,24 +4,32 @@
|
|||
# généré à l'installation avec nixos-generate-config
|
||||
# à copier dans le dossier courant depuis /etc/nixos
|
||||
./hardware-configuration.nix
|
||||
# ensemble de packages et configurations système
|
||||
./config/bluetooth.nix
|
||||
# machine spécifique
|
||||
./config/boot.nix
|
||||
./config/drivers_video.nix
|
||||
./config/extra-services.nix
|
||||
./config/fonts.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
|
||||
./config/wayland.nix
|
||||
# ajout pour forcer l'utilisation de cachix au max
|
||||
./config/low-ram.nix
|
||||
# profil nixos-hardware pour le ThinkPad E560
|
||||
./drivers_video.nix
|
||||
./low-ram.nix
|
||||
./config/power-management.nix
|
||||
# ensemble de packages et configurations système
|
||||
../common/basesystem/bluetooth.nix
|
||||
../common/basesystem/language.nix
|
||||
../common/basesystem/memory.nix
|
||||
../common/basesystem/system.nix
|
||||
../common/basesystem/system_saves.nix
|
||||
../common/basesystem/users.nix
|
||||
# style
|
||||
../common/style/fonts.nix
|
||||
../common/style/stylix.nix
|
||||
# additional services
|
||||
../common/services/gnome-keyring.nix
|
||||
../common/services/mullvad.nix
|
||||
../common/services/sound.nix
|
||||
# programs
|
||||
../common/programs/gamescope.nix
|
||||
../common/programs/steam.nix
|
||||
# packages & others
|
||||
../common/niri.nix
|
||||
../common/wayland.nix
|
||||
../common/system_packages.nix # profil nixos-hardware pour le ThinkPad E560
|
||||
# nécessite l'input nixos-hardware dans flake.nix
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel # active le microcode intel
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop # active tlp
|
||||
|
|
@ -33,8 +41,4 @@
|
|||
nixpkgs.config.allowUnfree = true;
|
||||
# ne pas toucher, défini une seule fois en fonction de la version de nixos de l'ISO pour la 1ère installation
|
||||
system.stateVersion = "25.11";
|
||||
# nécessaire pour permettre des dépendances problématiques parfois
|
||||
#nixpkgs.config.permittedInsecurePackages = [
|
||||
# "electron-39.8.10"
|
||||
#];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue