1
0
Go to file
2022-07-17 13:28:28 +02:00
common dns: add hw config, set dns server as default, fix firewall rule 2022-07-14 22:15:55 +02:00
hosts pre-router: Make deployment via nixdeploy possible and begin renumbering 2022-07-17 13:28:28 +02:00
modules policyrouting: Move ip rule magic to a dedicated module 2022-07-17 12:24:51 +02:00
packages package nerd 2022-07-12 11:04:14 +02:00
users fix(users): add password for jannik 2022-07-12 22:09:43 +02:00
.sops.yaml Add clerie to sops 2022-07-13 21:55:35 +02:00
deploy.sh add nixdeploy and deployment-script 2022-07-07 20:07:53 +02:00
flake.lock add secret handling via sops, configure nerd 2022-07-13 21:40:27 +02:00
flake.nix pre-router: Make deployment via nixdeploy possible and begin renumbering 2022-07-17 13:28:28 +02:00
README.md add secret handling via sops, configure nerd 2022-07-13 21:40:27 +02:00

VCP Bundeslager 2022 Nixfiles

How to deploy

./deploy.sh apply switch --on vpn7

or to deploy all gateways:

./deploy.sh apply switch --on gateway

There is a special case for the nixdeploy-host:

./deploy.sh apply-local switch --sudo --node nixdeploy

Secrets

Secrets are managed with sops, see https://github.com/Mic92/sops-nix

To add yourself, follow steps 2 and 4 of above mentioned README and add yourself to .sops.yaml in keys and all creation rules.

To add a new host, configure a creation rule in .sops.yaml, configure the key (e.g. fetch it with nix-shell -p ssh-to-age --run 'ssh-keyscan hostname.bula22.de | ssh-to-age' and add it to keys.

Then you can create a secrets file with nix-shell -p sops --run "sops hosts/hostname/secrets.yaml", add your secrets and then configure your secrets. Example:

sops.secrets.nerd_secret = {
  sopsFile = ./secrets.yaml;
  owner = "nerd";
  restartUnits = [ "nerd.service" ];
};

Your secret will then be available in /run/secrets/secret_name.