nixos/zeronet: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
c7481e6340
commit
4a4d3a2e04
|
@ -86,20 +86,17 @@ in with lib; {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d '${cfg.dataDir}' 750 zeronet zeronet - -"
|
||||||
|
"d '${cfg.logDir}' 750 zeronet zeronet - -"
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.zeronet = {
|
systemd.services.zeronet = {
|
||||||
description = "zeronet";
|
description = "zeronet";
|
||||||
after = [ "network.target" (optionalString cfg.tor "tor.service") ];
|
after = [ "network.target" (optionalString cfg.tor "tor.service") ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
preStart = ''
|
|
||||||
# Ensure folder exists or create it and permissions are correct
|
|
||||||
mkdir -p ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir}
|
|
||||||
chmod 750 ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir}
|
|
||||||
chown zeronet:zeronet ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir}
|
|
||||||
'';
|
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
PermissionsStartOnly = true;
|
|
||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
User = "zeronet";
|
User = "zeronet";
|
||||||
Group = "zeronet";
|
Group = "zeronet";
|
||||||
|
|
Loading…
Reference in New Issue