backwards: Add secrets for ssh machine (root) key

This commit is contained in:
Alexander Heldt
2024-08-15 15:12:48 +02:00
parent 385cb1dd7d
commit c580c07786
4 changed files with 36 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
{ lib, config, ... }:
let
enabled = config.mod.ssh.enable;
rootSSHKeyPath = "/etc/ssh";
in
{
options = {
@@ -20,6 +22,11 @@ in
openssh = {
enable = true;
ports = [ 1122 ];
hostKeys = [{
path = "${rootSSHKeyPath}/root.backwards";
type = "ed25519";
}];
};
};
@@ -28,5 +35,16 @@ in
allowedTCPPorts = [ 1122 ];
};
};
age.secrets = {
"root.backwards" = {
file = ../../../../secrets/backwards/root.backwards.age;
path = "${rootSSHKeyPath}/root.backwards";
};
"root.backwards.pub" = {
file = ../../../../secrets/backwards/root.backwards.pub.age;
path = "${rootSSHKeyPath}/root.backwards.pub";
};
};
};
}