forked from mirrors_public/oddlama_nix-config
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
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./secrets.nix
|
||||
./uid.nix
|
||||
|
||||
./config/htop.nix
|
||||
|
|
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