mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: add repo-like user secrets, rudimentary config of thunderbird
This commit is contained in:
parent
0994bba279
commit
926787528b
10 changed files with 115 additions and 3 deletions
21
users/modules/secrets.nix
Normal file
21
users/modules/secrets.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
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.";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue