top-level configurations for all my NixOS machines
Go to file
colin 4689d49d9f secrets: add lappy host key to access list 2022-06-06 18:07:28 -07:00
helpers hardware-x86_64: port to modules system 2022-06-06 17:51:35 -07:00
machines hardware-x86_64: port to modules system 2022-06-06 17:51:35 -07:00
modules hardware-x86_64: port to modules system 2022-06-06 17:51:35 -07:00
nixpatches whalebird: use `mkDerivation`'s `desktopItems` 2022-06-05 21:52:25 -07:00
pkgs kaiteki: use `unstable`-based versioning; `desktopItems` instead of `desktopItem` 2022-06-05 23:30:58 -07:00
secrets secrets: add lappy host key to access list 2022-06-06 18:07:28 -07:00
.gitignore move secrets to a subdirectory, for improved overrides 2022-05-26 23:52:08 -07:00
.sops.yaml secrets: add lappy host key to access list 2022-06-06 18:07:28 -07:00
TODO.md update TODO 2022-06-06 01:19:29 -07:00
configuration.nix move sops config to a dedicated file 2022-06-06 17:25:33 -07:00
flake.lock secrets: add an example sops secret 2022-06-06 16:39:27 -07:00
flake.nix gui/sway: port to module system 2022-06-06 17:35:28 -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