- Build config:
make result(createsresultsymlink without activating) - Apply config:
- Never apply config without explicit confirmation from the user
- Check
/etc/os-releasefirst to determine if running on NixOS - If
grep -q "ID=nixos" /etc/os-release: runmake switch(builds and activates immediately on NixOS) - Otherwise: run
make home-manager-switch(applies home-manager config only)
- Apply on reboot:
make boot(builds and sets as default for next boot) - Update flake inputs:
make update - Format Nix files:
nixfmt <file.nix>(use RFC 166 style) - No test suite: This is a declarative configuration repo with no automated tests
- Language: Nix expressions following RFC 166 formatting style
- Imports: Use relative paths (e.g.,
./module.nix,../common); group inimports = [ ]lists - Formatting: 2-space indentation, trailing semicolons, format with
nixfmt-rfc-style - Function args: Multi-line attribute sets with one parameter per line, closed with
}: - Let bindings: Use
let ... infor local variables; prefer descriptive names - Packages: Use
with pkgs;for package lists; prefix unstable packages withpkgs-unstable. - Comments: Inline for configuration context (e.g.,
# Boot,# Services) - Naming: Use kebab-case for files/directories (e.g.,
my-module.nix); snake_case for Nix attributes
- Structure: Flake-based with
mkHostandmkHomehelper functions inlib/ - Machines: Per-machine configs in
machines/<name>/with NixOS config and home-manager config - Profiles: Shared config profiles in
profiles - Never modify:
flake.lockmanually;system.stateVersionvalues