nixfiles monorepo!! :3333
- Nix 97.8%
- Shell 2.2%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
|---|---|---|
| hosts | ||
| lib/partials | ||
| scripts | ||
| secrets | ||
| services | ||
| .gitignore | ||
| .sops.yaml | ||
| .woodpecker.yaml | ||
| flake.lock | ||
| flake.nix | ||
| logo.png | ||
| README.md | ||
nixfiles :3
ok hi this is my one big flake for every machine i own. used to be eight separate per-host repos, now it's a monorepo. the code is a bit of a zoo (every host pins its own nixpkgs) but welp, it works :3
the machines
| attr | what | nixpkgs |
|---|---|---|
m68k (darwin) |
macbook air m3, my main laptop | 26.05 |
macvm (darwin) |
x86 macos vm, also hydra runner | 25.11 |
macmini |
mac mini server | unstable |
nixvm |
linux vm | 25.11 |
playground1 |
hostkey vds, runs a pile of services | 25.11 |
playground2 |
hostkey vds, minecraft mostly | 25.11 |
eva01 |
thinkpad x230, secondary laptop | unstable |
alphys |
surface laptop 3 (linux-surface kernel, disko) | unstable |
default (nix-on-droid) |
phone (pixel 3a) | 24.05 |
how its wired
hosts/<name>/- per-host confighosts/nixos-common.nix- baseline auto-imported into every nixos hostlib/partials/- opt-in feature modules. every config gets apartialsattrset so you just writeimports = [ partials.boot-efi partials.chrony ];services/- reusable service modules, pulled in withabs(e.g.(abs "services/tailscale-exit-node.nix"))secrets/- sops secrets, one.sops.yamlat the rootscripts/- little helpers (cpr,lmg,cmg,sops)
other goodies handed to each module via specialArgs: inputs, outputs (= self),
and abs "path" (absolute path from the repo root).
impure dependencies
note to self on what has to exist on the host manually:
/home/lain/.ssh/agenix_key- private age key for sops decryption (needed onplayground2,eva01andalphys)
setting up
# nixos
sudo nixos-rebuild switch --flake .#playground1
# darwin
darwin-rebuild switch --flake .#m68k
# phone
nix-on-droid switch --flake .#default
# just check everything evaluates
nix flake check --all-systems