feat(nixos): add user password secrets to sops
This commit adds the user password secrets to sops. It leverages the `userListToAttrs` lib function.
This commit is contained in:
parent
782a4324a8
commit
4ff7b8e18f
5 changed files with 42 additions and 15 deletions
|
@ -18,17 +18,22 @@ in
|
|||
type = lazyAttrsOf raw;
|
||||
default = { };
|
||||
};
|
||||
root = mkOption {
|
||||
type = path;
|
||||
default = "";
|
||||
paths = {
|
||||
root = mkOption { type = path; };
|
||||
secrets = mkOption {
|
||||
type = path;
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
admin = mkOption {
|
||||
type = lazyAttrsOf raw;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config.flake.admin = cfg.manifest.users.${username} // {
|
||||
inherit username;
|
||||
config.flake = {
|
||||
paths.secrets = cfg.paths.root + "/secrets";
|
||||
admin = cfg.manifest.users.${username} // {
|
||||
inherit username;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue