1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00
oddlama_nix-config/users/modules/secrets.nix
2024-11-26 13:34:55 +01:00

23 lines
530 B
Nix

{
config,
lib,
nixosConfig,
...
}:
let
inherit (lib) mkOption types;
in
{
options.userSecretsName = mkOption {
default = "user-${config._module.args.name}";
type = types.str;
description = "The secrets attribute name that should be made available as userSecrets";
};
options.userSecrets = mkOption {
readOnly = true;
default = nixosConfig.repo.secrets.${config.userSecretsName};
type = types.unspecified;
description = "Conveniently exposes the secrets for this user, if any.";
};
}