Merge pull request 'secrets.password-store: readd targetDirectory' (#361) from lassulus-HEAD into main
All checks were successful
checks-impure / test (push) Successful in 8s
checks / test (push) Successful in 23s
assets1 / test (push) Successful in 6s

This commit is contained in:
clan-bot 2023-09-27 19:28:42 +00:00
commit 96df913184

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