backwards: Add secrets for ssh machine (root) key
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user