Skip to content

Commit

Permalink
users: add isSystemUser and group
Browse files Browse the repository at this point in the history
  • Loading branch information
fgaz committed Mar 21, 2022
1 parent 63cc00a commit f74fb54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 9 additions & 3 deletions modules/services/TLS/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,18 @@ in
}
];

users.groups = fold (identifier: con: con // {
users.groups = (fold (identifier: con: con // {
"${filterIdentifier identifier}" = let c = config.nixcloud.TLS.certs.${identifier}; in { members = c.users; };
}) {} (attrNames config.nixcloud.TLS.certs);
}) {} (attrNames config.nixcloud.TLS.certs))
// optionalAttrs (acmeSupplied != []) {
nixcloud-lego-user = {};
};

users.users = optionalAttrs (acmeSupplied != []) {
nixcloud-lego-user = {};
nixcloud-lego-user = {
isSystemUser = true;
group = "nixcloud-lego-user";
};
};

systemd.services = listToAttrs (selfsignedTargets ++ userSuppliedTargets ++ acmeSupplied ++ acmeSuppliedPreliminary);
Expand Down
5 changes: 4 additions & 1 deletion modules/services/reverse-proxy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ in
};


users.extraUsers."${user}".group = "${group}";
users.extraUsers."${user}" = {
group = "${group}";
isSystemUser = true;
};

users.extraGroups."${user}" = {};

Expand Down

0 comments on commit f74fb54

Please sign in to comment.