Start using age for secret management

This commit is contained in:
Charlotte Van Petegem 2021-06-20 00:18:20 +02:00
parent 276c8f33c8
commit da9160559c
No known key found for this signature in database
GPG key ID: 019E764B7184435A
39 changed files with 281 additions and 30 deletions

View file

@ -1,10 +1,6 @@
{ config, lib, ... }:
{
imports = [
./sshd/secret.nix
];
options.chvp.sshd.enable = lib.mkOption {
default = false;
example = true;
@ -19,6 +15,10 @@
{ bits = 4096; path = "${config.chvp.dataPrefix}/etc/ssh/ssh_host_rsa_key"; type = "rsa"; }
{ path = "${config.chvp.dataPrefix}/etc/ssh/ssh_host_ed25519_key"; type = "ed25519"; }
];
authorizedKeysFiles = [ "/run/secrets/authorized_keys/%u" ];
};
age.secrets."authorized_keys/charlotte".file = ../secrets/authorized_keys/charlotte.age;
age.secrets."authorized_keys/root".file = ../secrets/authorized_keys/root.age;
};
}