Flake-based NixOS + Home Manager configuration for desktop (pc) and laptop.
# Switch system configuration
nh os switch -H pc
nh os switch -H laptop
# Apply user environment
home-manager switch --flake .#ludovic@pc
home-manager switch --flake .#ludovic@laptop
# Validate
nix flake check
nixos-rebuild dry-run --flake .#pc
nixos-rebuild dry-run --flake .#laptop
# Format
nix fmtdocs/README.md– structure + commandsdocs/setup-ssh-keys.md– SSH + secrets workflow
flake.nix– flake entrypointmodules/– shared module tree (flake outputs, NixOS, Home Manager, host matrix)modules/hosts/– host matrix declaring which module sets each machine usesnixos/– per-host NixOS entrypoints and hardware bits (e.g.,nixos/pc/pc.nix)wallpapers/– desktop assets
Why both modules/hosts and nixos/?
modules/hosts/default.nixis the matrix that maps host names to module sets for both NixOS and Home Manager.nixos/<host>/<host>.nixis the system entrypoint that pulls in hardware and per-machine files.