Please let me know if you see anything dubious or that can be improved.
This is a flake-based system configuration for my NixOS devices, with system-wide settings being setup through NixOS modules and personal/user settings being configured through the NixOS home-manager module.
The directory structure is:
config
are random configuration files that are used in nix moduleshosts
contain the nixos/darwin/home-manager entry moduleslib
has a couple of nix helpersmodules
holdshome-manager
andnixos
modulespackages
holds a few self-sourced packages, overrides, and scriptsscripts
holds a few trivial nushell scripts, an awk script, and a playground for haskell scriptssecrets
holds the sops secrets
You will probably want to pick one of my devices as an example:
thelxinoe
is my desktoparche
is a desktop with an nvidia gfx (they're finnicky!)apate
is my work macbook pro (hey, not my choice)janus
andaiode
are my laptopsfractal
is my headless home serverjellyfin
is a hetzner VM
sudo nixos-rebuild switch --flake .#newname
If you want to update the flake pins, you can run nix flake update
.
Easy access to configs:
For age keys
nix-shell -p ssh-to-age
cat public_ed25519 | ssh-to-age # use this as the public key in the sops file
cat private_ed25519 | ssh-to-age -private-key # put this in ~/.config/sops/age/keys.txt