Skip to content

Commit

Permalink
Hardcode 0
Browse files Browse the repository at this point in the history
  • Loading branch information
munnik committed Oct 22, 2024
1 parent 6b24fab commit 42a1cae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/sops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ let
};
uid = lib.mkOption {
type = lib.types.ints.unsigned;
default = users.users."root".uid;
default = 0;
description = ''
UID of the file, only applied when owner is null. The UID will be applied even if the corresponding user doesn't exist.
'';
Expand All @@ -96,7 +96,7 @@ let
};
gid = lib.mkOption {
type = lib.types.ints.unsigned;
default = users.groups."root".gid;
default = 0;
description = ''
GID of the file, only applied when group is null. The GID will be applied even if the corresponding group doesn't exist.
'';
Expand Down Expand Up @@ -333,10 +333,10 @@ in {
(builtins.isString secret.sopsFile && lib.hasPrefix builtins.storeDir secret.sopsFile);
message = "'${secret.sopsFile}' is not in the Nix store. Either add it to the Nix store or set sops.validateSopsFiles to false";
} {
assertion = secret.uid != users.users."root".uid -> secret.owner == null;
assertion = secret.uid != 0 -> secret.owner == null;
message = "In ${secret.name} exactly one of sops.owner and sops.uid must be set";
} {
assertion = secret.gid != users.groups."root".gid -> secret.group == null;
assertion = secret.gid != 0 -> secret.group == null;
message = "In ${secret.name} exactly one of sops.group and sops.gid must be set";
}]) cfg.secrets)
);
Expand Down

0 comments on commit 42a1cae

Please sign in to comment.