nixos/stanchion: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
a585d29bfd
commit
0113cc0de9
@ -98,7 +98,7 @@ in
|
|||||||
type = types.path;
|
type = types.path;
|
||||||
default = "/var/log/stanchion";
|
default = "/var/log/stanchion";
|
||||||
description = ''
|
description = ''
|
||||||
Log directory for Stanchino.
|
Log directory for Stanchion.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -152,6 +152,11 @@ in
|
|||||||
|
|
||||||
users.groups.stanchion.gid = config.ids.gids.stanchion;
|
users.groups.stanchion.gid = config.ids.gids.stanchion;
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d '${cfg.logDir}' - stanchion stanchion --"
|
||||||
|
"d '${cfg.dataDir}' 0700 stanchion stanchion --"
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.stanchion = {
|
systemd.services.stanchion = {
|
||||||
description = "Stanchion Server";
|
description = "Stanchion Server";
|
||||||
|
|
||||||
@ -168,25 +173,12 @@ in
|
|||||||
environment.STANCHION_LOG_DIR = "${cfg.logDir}";
|
environment.STANCHION_LOG_DIR = "${cfg.logDir}";
|
||||||
environment.STANCHION_ETC_DIR = "/etc/stanchion";
|
environment.STANCHION_ETC_DIR = "/etc/stanchion";
|
||||||
|
|
||||||
preStart = ''
|
|
||||||
if ! test -e ${cfg.logDir}; then
|
|
||||||
mkdir -m 0755 -p ${cfg.logDir}
|
|
||||||
chown -R stanchion:stanchion ${cfg.logDir}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! test -e ${cfg.dataDir}; then
|
|
||||||
mkdir -m 0700 -p ${cfg.dataDir}
|
|
||||||
chown -R stanchion:stanchion ${cfg.dataDir}
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/stanchion console";
|
ExecStart = "${cfg.package}/bin/stanchion console";
|
||||||
ExecStop = "${cfg.package}/bin/stanchion stop";
|
ExecStop = "${cfg.package}/bin/stanchion stop";
|
||||||
StandardInput = "tty";
|
StandardInput = "tty";
|
||||||
User = "stanchion";
|
User = "stanchion";
|
||||||
Group = "stanchion";
|
Group = "stanchion";
|
||||||
PermissionsStartOnly = true;
|
|
||||||
# Give Stanchion a decent amount of time to clean up.
|
# Give Stanchion a decent amount of time to clean up.
|
||||||
TimeoutStopSec = 120;
|
TimeoutStopSec = 120;
|
||||||
LimitNOFILE = 65536;
|
LimitNOFILE = 65536;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user