clan-core/nixosModules/clanCore/facts/secret/password-store.nix
lassulus 4964415d34
All checks were successful
checks / checks (pull_request) Successful in 4m22s
checks / checks-impure (pull_request) Successful in 1m47s
facts password-store: take path from variable
2024-04-21 19:09:46 +02:00

18 lines
619 B
Nix

{ config, lib, ... }:
{
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.facts.secretStore == "password-store") {
clanCore.facts.secretPathFunction =
secret: "${config.clan.password-store.targetDirectory}/${secret.config.name}";
clanCore.facts.secretUploadDirectory = config.clan.password-store.targetDirectory;
clanCore.facts.secretModule = "clan_cli.facts.secret_modules.password_store";
};
}