nix infra
emily
c3313d585d
Flake lock file updates: • Updated input 'home-manager': 'github:nix-community/home-manager/4855bfb6ce20225a1b0e2aae2379da909ab38350?narHash=sha256-ve562FlHVa7xhLfkFc1ihg1kuuq55IMfkxAgBQcFUY0%3D' (2024-05-10) → 'github:nix-community/home-manager/c6ddd80fb1e5a286b3a5cb32ef94a2e4e346a9d3?narHash=sha256-wDIdf%2BU2o4BJG3AwHD6N88X9zcfurbRwWYwv5HlG7z4%3D' (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