forked from emily/nixfiles
nix infra
emily
f3884cde64
Flake lock file updates: • Updated input 'kyouma-www': 'git+https://git.bsd.gay/snaki/kyouma-net.git?ref=refs/heads/main&rev=aff69d79e11cbfb40ea41636e882331499dab41a' (2024-03-24) → 'git+https://git.bsd.gay/snaki/kyouma-net.git?ref=refs/heads/main&rev=ecbb3bd8bfcf080aa2f724c24c06ce4ef87db997' (2024-05-10) |
||
---|---|---|
config | ||
lib/shinyflakes | ||
modules | ||
pkgs | ||
secrets/services | ||
.gitignore | ||
.sops.yaml | ||
flake.lock | ||
flake.nix | ||
README.md |
emilys Nix Infra
First deployment
remote hosts
$ nix run github:nix-community/nixos-anywhere -- --flake ".#<configuration>" root@<target-host>
desktops
$ nix --extra-experimental-features nix-command run github:nix-community/nixos-anywhere -- --flake "git+https://git.bsd.gay/snaki/nixfiles.git#<configuration>" --no-reboot --build-on-target root@127.0.0.1
$ nixos-enter
$ passwd <local-user>
reboot
$ git clone https://git.bsd.gay/snaki/nixfiles.git
$ colmena apply-local --sudo --node <node>
Deploy changes on ...
all hosts
$ colmena apply --on @production
routers only
$ colmena apply --on @router
Structure
nixfiles
├── config # NixOS configuration
│ ├── common # configuration applyed to all hosts (some settings might be influenced by machine-type)
│ │ └── users # user configuration
│ ├── hosts # configuration for specific hosts
│ ├── profiles # configuariotn for specific machine types
│ └── services # common service configuration
├── lib # helper functions
├── modules # NixOS modules
└── pkgs # nixpkgs overlays