top-level configurations for all my NixOS machines
Go to file
colin 5152159691 try to add Kaiteki as a package
requires updating dart (flutter), which is causing problems...
2022-06-05 02:28:23 -07:00
helpers try to add Kaiteki as a package 2022-06-05 02:28:23 -07:00
machines desko: switch to sway compositor 2022-06-03 01:40:32 -07:00
nixpatches try to add Kaiteki as a package 2022-06-05 02:28:23 -07:00
pkgs try to add Kaiteki as a package 2022-06-05 02:28:23 -07:00
secrets uninsane: enable nix-cache 2022-05-28 12:39:50 -07:00
.gitignore move secrets to a subdirectory, for improved overrides 2022-05-26 23:52:08 -07:00
TODO.md point to nix SOPS for secret management 2022-05-27 03:08:13 -07:00
configuration.nix port to a flake 2022-05-21 01:59:51 +00:00
flake.lock update nixpkgs, NUR 2022-06-04 21:03:12 -07:00
flake.nix try to add Kaiteki as a package 2022-06-05 02:28:23 -07:00
image.nix add img targets for desko and uninsane machines 2022-05-22 02:57:05 -07:00
readme.md update secrets documentation 2022-05-27 01:01:06 -07:00

readme.md

after checking out, drop secrets into secrets/

to build:

nixos-rebuild --flake "/etc/nixos/#uninsane" {build,switch}

query with:

nix flake show

secrets

secrets/default.nix declares the secrets exposed at evaluation time. these are defined outside git by writing the actual values to secrets/local.nix.

don't check in the local.nix file. use git update-index --assume-unchanged secrets/local.nix to prevent it from ever being added. but after that you can set them to their real value and run git update-index --assume-unchanged secrets/*

building images

to build a distributable image (GPT-formatted image with rootfs and /boot partition):

nix build .#imgs.lappy

this can then be dd'd onto a disk and directly booted from a EFI system. there's some post-processing to do before running a rebuild on the deployed system (e.g. change fstab UUIDs) refer to flake.nix for more details

admin tips

online: https://nixos.wiki/wiki/Cheatsheet

verify ALL nix store contents with:

sudo nix-store --verify --check-contents  # add the --repair flag to auto-repair as well

search for a package with:

nix search nixpkgs <query string>

find which package owns some file with:

nix-locate /bin/vim  # or any other package-relative path