about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-08-04 13:01:47 +0900
committersefidel <contact@sefidel.net>2024-08-04 13:04:44 +0900
commitcf3a0e6bca52f81969cc08f8538a41e2bbc5e494 (patch)
tree796e44e09d46948e7e1c074a249df7e3bedca5ff /modules
parent9fca7b4624755954c41edd1f5b35331f48c3c992 (diff)
downloadnixrc-cf3a0e6bca52f81969cc08f8538a41e2bbc5e494.tar.gz
nixrc-cf3a0e6bca52f81969cc08f8538a41e2bbc5e494.zip
feat(modules/persistence)!: make ssh host keys management optional
Diffstat (limited to 'modules')
-rw-r--r--modules/persistence.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/persistence.nix b/modules/persistence.nix
index 3131d61..22d9be6 100644
--- a/modules/persistence.nix
+++ b/modules/persistence.nix
@@ -17,6 +17,8 @@ in
       '';
     };
 
+    setupSshHostKeys = mkEnableOption "configure persistence for OpenSSH Host keys";
+
     directories = mkOption {
       type = types.listOf types.str;
       default = [ ];
@@ -28,7 +30,7 @@ in
 
     environment.persistence.${cfg.storagePath}.directories = cfg.directories;
 
-    services.openssh.hostKeys = [
+    services.openssh.hostKeys = mkIf cfg.setupSshHostKeys [
       {
         path = "${cfg.storagePath}/ssh/ssh_host_ed25519_key";
         type = "ed25519";