top-level configurations for all my NixOS machines
Go to file
colin 3a937e7a15 rpi u-boot patch: simplify 2022-06-02 15:29:09 -07:00
helpers add sshfs uninsane mount 2022-06-02 03:42:58 -07:00
machines port raspberry pi bootloader fixes to a nixpkgs patch 2022-06-02 14:18:41 -07:00
nixpatches rpi u-boot patch: simplify 2022-06-02 15:29:09 -07:00
pkgs toy around with explicitly spinning down the hard drive during shutdown 2022-05-18 10:40:28 +00: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 remove pkgs-mobile: run moby off the same packages as my other system 2022-06-01 17:48:37 -07:00
flake.nix port raspberry pi bootloader fixes to a nixpkgs patch 2022-06-02 14:18:41 -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