2023-01-03 13:32:15 +02:00
|
|
|
Config
|
|
|
|
------
|
|
|
|
|
2023-01-03 13:35:57 +02:00
|
|
|
This is an attempt to configure my NixOS servers with [krops][1]. Usage:
|
|
|
|
|
|
|
|
$ direnv allow .
|
|
|
|
$ nix-build ./krops.nix -A hel1a && ./result
|
|
|
|
|
|
|
|
There is probably nothing to look at here.
|
|
|
|
|
2023-04-05 09:15:02 +03:00
|
|
|
Upcoming flakes:
|
|
|
|
|
|
|
|
$ nix build .#deploy.nodes.hel1-a.profiles.system.path
|
|
|
|
|
2023-04-14 14:12:45 +03:00
|
|
|
VM:
|
|
|
|
|
|
|
|
$ nix build .#nixosConfigurations.vm.config.system.build.vm
|
|
|
|
|
|
|
|
Encoding host-only secrets
|
|
|
|
--------------------------
|
2023-04-16 06:54:29 +03:00
|
|
|
|
|
|
|
Encode a secret on host:
|
|
|
|
|
2023-04-14 14:12:45 +03:00
|
|
|
rage -e -r "$(cat /etc/ssh/ssh_host_ed25519_key.pub)" -o secret.age /path/to/plaintext
|
2023-04-16 06:54:29 +03:00
|
|
|
|
|
|
|
Decode a secret on host (to test things out):
|
|
|
|
|
2023-04-14 14:12:45 +03:00
|
|
|
rage -d -i /etc/ssh/ssh_host_ed25519_key secret.age
|
|
|
|
|
|
|
|
Bootstrapping
|
|
|
|
-------------
|
2023-04-16 06:54:29 +03:00
|
|
|
|
2023-04-14 14:12:45 +03:00
|
|
|
Prereqs:
|
|
|
|
|
|
|
|
mkdir -p /etc/secrets/initrd
|
|
|
|
ssh-keygen -t ed25519 -f /etc/secrets/initrd/ssh_host_ed25519
|
2023-04-16 06:54:29 +03:00
|
|
|
|
2023-01-03 13:35:57 +02:00
|
|
|
[1]: https://cgit.krebsco.de/krops/about/
|
2023-04-14 14:12:45 +03:00
|
|
|
|