No description
  • Nix 63.3%
  • Python 17.1%
  • Lua 9.5%
  • Shell 9.1%
  • CSS 1%
Find a file
2026-11-03 22:14:41 +00:00
docs docs: prek end-of-file fixup on keyboard spec/plan 2026-11-02 20:02:12 +00:00
home Install pass 2026-11-03 21:45:29 +00:00
hosts panasonic: enable panafanpwr fan control 2026-11-03 01:09:10 +00:00
modules Add nix-ld 2026-11-03 22:14:41 +00:00
secrets Panasonic CF-SV1 install 2026-11-02 19:39:47 +00:00
.envrc flake: devShell with prek + nixfmt; .envrc 2026-11-02 01:36:54 +00:00
.gitignore feat: flake scaffold, options, prek tooling 2026-11-01 13:46:10 +00:00
.pre-commit-config.yaml feat: flake scaffold, options, prek tooling 2026-11-01 13:46:10 +00:00
.sops.yaml Panasonic CF-SV1 install 2026-11-02 19:39:47 +00:00
flake.lock panasonic: enable panafanpwr fan control 2026-11-03 01:09:10 +00:00
flake.nix panasonic: enable panafanpwr fan control 2026-11-03 01:09:10 +00:00
README.md fix: restore NetworkManager on vm, README style + networking guidance 2026-11-01 14:51:30 +00:00

nixos-config

NixOS flake. Configures the QEMU/libvirt VM today; the ThinkPad P15 and Panasonic CF-SV1 join later.

Layout

  • flake.nix: nixpkgs pinned to nixos-26.05, home-manager as a NixOS module, one nixosConfigurations.<host> entry per host.
  • hosts/<name>/: host identity: hostname, system.stateVersion, kernel choice, custom.* toggles, disk parameters.
  • modules/: shared modules. Options are declared in modules/options.nix under custom.*; the optional parts gate on them (custom.ssh, custom.desktop, custom.vm, custom.btrfs).
  • home/: home-manager packages for niyari. home/default.nix is shared, home/vm.nix is host-specific.
  • docs/superpowers/: specs and plans.

hosts/vm runs the latest kernel and carries an lts-kernel specialisation, tagged LTS in the boot menu.

Building

Inside the VM (the flake can live anywhere, e.g. ~/nixos-config; it does not need /etc/nixos):

sudo nixos-rebuild switch --flake .#vm

From the host, once vm is an ssh alias (builds locally, copies the closure over):

nixos-rebuild --flake .#vm --target-host vm --build-host localhost

Run nix flake check before committing; it evaluates the config. Note that flake check does not force specialisations; when you touch a specialisation, force-eval it, e.g. nix eval .#nixosConfigurations.vm.config.specialisation.lts-kernel.configuration.system.build.toplevel.drvPath.

Adding a host

Create hosts/<name>/default.nix with the same shape as hosts/vm/default.nix:

  • hostname, system.stateVersion, nixpkgs.hostPlatform
  • kernel choice, plus a specialisation if you want an alternate kernel
  • toggles: custom.ssh.enable, custom.desktop.enable, custom.vm.enable
  • networking: enable what the host needs per host, e.g. networking.networkmanager.enable = true; (see hosts/vm)
  • custom.btrfs.enable with luksUuid, espUuid, swapSize (MiB) if the disk matches the shared LUKS+btrfs layout; divergent hardware (multiple drives, unusual ESP) keeps its own hardware-configuration and skips custom.btrfs
  • home-manager.users.niyari imports

Then add a nixosConfigurations.<name> entry pointing at it in flake.nix.