mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
23 lines
530 B
Nix
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.";
|
|
};
|
|
}
|