vars: add the user and group options on files
This changeset forwards the ownership control options from sops-nix.
This commit is contained in:
@@ -119,6 +119,14 @@ in
|
||||
'';
|
||||
type = str;
|
||||
};
|
||||
owner = {
|
||||
description = "The user name or id that will own the secret file. This option is currently only implemented for sops";
|
||||
default = "root";
|
||||
};
|
||||
group = {
|
||||
description = "The group name or id that will own the secret file. This option is currently only implemented for sops";
|
||||
default = "root";
|
||||
};
|
||||
value =
|
||||
{
|
||||
description = ''
|
||||
|
||||
@@ -40,6 +40,7 @@ in
|
||||
flip map vars (secret: {
|
||||
name = "vars/${secret.generator}/${secret.name}";
|
||||
value = {
|
||||
inherit (secret) owner group;
|
||||
sopsFile = secretPath secret;
|
||||
format = "binary";
|
||||
};
|
||||
|
||||
@@ -21,10 +21,11 @@ in
|
||||
flip mapAttrsToList vars.generators (
|
||||
gen_name: generator:
|
||||
flip mapAttrsToList (relevantFiles generator) (
|
||||
fname: _file: {
|
||||
fname: file: {
|
||||
name = fname;
|
||||
generator = gen_name;
|
||||
inherit (generator) share;
|
||||
inherit (file) owner group;
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user