top-level configurations for all my NixOS machines
Go to file
colin 43fa7fdd9f rename machines -> hosts
- shorter.
- congruent with `nixos-rebuild .` choosing what to build based on `hostname`.
- more widely used within other nix repos i've seen.
- more accurate in the case that i migrate a host to a different
machine (which i plan to do with servo).
2022-11-22 02:33:47 +00:00
hosts rename machines -> hosts 2022-11-22 02:33:47 +00:00
modules rename machines -> hosts 2022-11-22 02:33:47 +00:00
nixpatches duplicity: refactor and update files list 2022-11-21 10:39:52 +00:00
pkgs duplicity: add script to restore from backup 2022-11-21 11:47:07 +00:00
scripts commit ensure-perms script for image post-processing 2022-10-21 02:04:30 -07:00
secrets duplicity: refactor and update files list 2022-11-21 10:39:52 +00:00
.gitignore move secrets to a subdirectory, for improved overrides 2022-05-26 23:52:08 -07:00
.sops.yaml moby: enable a statically-assigned but encrypted password 2022-10-24 07:39:50 -07:00
flake.lock update nixpkgs: 2022-11-05 -> 2022-11-09 2022-11-15 10:04:25 +00:00
flake.nix rename machines -> hosts 2022-11-22 02:33:47 +00:00
readme.md rename machines -> hosts 2022-11-22 02:33:47 +00:00

to deploy:

nixos-rebuild --flake "./#servo" {build,switch}

if the target is the same as the host, nix will grab the hostname automatically:

nixos-rebuild --flake . {build,switch}

more options (like building packages defined in this repo):

nix flake show

secrets

i use sops for secrets. see modules/universal/secrets.nix for some tips.

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 (deploying ssh keys, optionally changing fs UUIDs, etc). refer to flake.nix for more details.

building packages

to build one of the custom sane packages, just name it:

nix build ./#fluffychat-moby

to build a nixpkg:

nix build ./#nixpkgs.curl

to build a package for another platform:

nix build ./#packages.aarch64-linux.nixpkgs.ubootRaspberryPi4_64bit