summaryrefslogtreecommitdiffstats
path: root/krebs/4lib
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-09-27 16:15:53 +0200
committertv <tv@shackspace.de>2015-09-27 16:15:53 +0200
commit18cfca4fe8d94f11c004fe72289b10c32a89ed68 (patch)
tree15c7dd48337f5f1c85e39168e9431ad2f5f68a71 /krebs/4lib
parent5a0d8f45c173815d3d460453956212c2ad8df3a7 (diff)
krebs: set host key for hosts with ssh.privkey
Diffstat (limited to 'krebs/4lib')
-rw-r--r--krebs/4lib/types.nix26
1 files changed, 20 insertions, 6 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index a7df9208..0aa594fb 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -57,13 +57,27 @@ types // rec {
else trace "The option `krebs.hosts.${config.name}.ssh.pubkey' is unused." null;
};
ssh.privkey = mkOption {
- type = either path str;
- apply = x: {
- path = toString x;
- string = x;
- }.${typeOf x};
+ type = nullOr (submodule {
+ options = {
+ bits = mkOption {
+ type = nullOr (enum ["4096"]);
+ default = null;
+ };
+ path = mkOption {
+ type = either path str;
+ apply = x: {
+ path = toString x;
+ string = x;
+ }.${typeOf x};
+ };
+ type = mkOption {
+ type = enum ["rsa" "ed25519"];
+ default = "ed25519";
+ };
+ };
+ });
+ default = null;
};
-
};
});