nix configuration for
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
colin 041adb7092 snippets: add nixos search URL 1 hour ago
hosts trust-dns: fix SOA 1 day ago
modules snippets: add nixos search URL 1 hour ago
nixpatches nixpatches: update aerc fix hash 2 days ago
pkgs add script to query public IP 1 day ago
scripts bluetooth: share connections across machines 6 days ago
secrets bluetooth: persist bluetooth earbuds connection 5 days ago
templates/python-data add `templates.python-data` 1 week ago
.gitignore move secrets to a subdirectory, for improved overrides 7 months ago
.sops.yaml moby: enable a statically-assigned but encrypted password 2 months ago
flake.lock update nixpkgs: 2022-11-27 -> 2022-12-02 5 days ago
flake.nix add `templates.python-data` 1 week ago readme: update contact info, explain `modules/` dir 2 weeks ago

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


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

using this repo in your own config

i try to ensure everything in the modules/ directory is hidden behind some enable flag or other. it should be possible to copy that whole directory into your own config, and then selectively populate what you want (like the impermenance paths, etc). more practically, a lot of things in there still assume a user named colin, so you'll probably want to patch it for your name -- or just use it as a reference.


if you want to contact me for questions, or collaborate to split something useful into a shared repo, etc, you can reach me via any method listed here.