secrets.password-store: readd targetDirectory
All checks were successful
checks-impure / test (pull_request) Successful in 8s
checks / test (pull_request) Successful in 22s

This commit is contained in:
lassulus 2023-09-27 21:26:58 +02:00
parent 1bf4ab22e4
commit b587bd1b49

View File

@ -3,8 +3,15 @@ let
passwordstoreDir = "\${PASSWORD_STORE_DIR:-$HOME/.password-store}";
in
{
options.clan.password-store.targetDirectory = lib.mkOption {
type = lib.types.path;
default = "/etc/secrets";
description = ''
The directory where the password store is uploaded to.
'';
};
config = lib.mkIf (config.clanCore.secretStore == "password-store") {
clanCore.secretsDirectory = passwordstoreDir;
clanCore.secretsDirectory = config.clan.password-store.targetDirectory;
system.clan.generateSecrets = pkgs.writeScript "generate-secrets" ''
#!/bin/sh
set -efu