mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 18:19:11 +00:00
services/vouch-proxy: use system user for service
This enables integration with secrets such as sops-nix instead of the previous service config of being a dynamic user.
This commit is contained in:
parent
d43708983a
commit
5657a5e023
@ -76,14 +76,12 @@ let
|
||||
'';
|
||||
script = "${lib.getExe' instance.package "vouch-proxy"} -config ${settingsFile'}";
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
User = "vouch-proxy";
|
||||
Group = "vouch-proxy";
|
||||
User = config.users.users.vouch-proxy.name;
|
||||
Group = config.users.groups.vouch-proxy.name;
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
|
||||
PrivateUsers = true;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
|
||||
@ -167,5 +165,13 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services = lib.mapAttrs' mkVouchInstance cfg.instances;
|
||||
|
||||
users.users.vouch-proxy = {
|
||||
description = "Vouch Proxy user";
|
||||
group = config.users.groups.vouch-proxy.name;
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.vouch-proxy = { };
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user