From cf3a0e6bca52f81969cc08f8538a41e2bbc5e494 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 4 Aug 2024 13:01:47 +0900 Subject: feat(modules/persistence)!: make ssh host keys management optional --- modules/persistence.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; -- cgit 1.4.1