1
1
Fork 1
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:
oddlama 2023-09-16 14:04:02 +02:00
parent 0994bba279
commit 926787528b
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
10 changed files with 115 additions and 3 deletions

21
users/modules/secrets.nix Normal file
View 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.";
};
}