nixos/go-neb: Replace PermissionsStartOnly with executable prefix

This should work as a drop-in replacement and satisfy #53852.
This commit is contained in:
Martin Weinelt 2023-04-04 01:01:49 +02:00
parent bd8977b28b
commit 34464d6044
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -60,13 +60,12 @@ in {
serviceConfig = {
ExecStartPre = lib.optional (cfg.secretFile != null)
(pkgs.writeShellScript "pre-start" ''
("+" + pkgs.writeShellScript "pre-start" ''
umask 077
export $(xargs < ${cfg.secretFile})
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > ${finalConfigFile}
chown go-neb ${finalConfigFile}
'');
PermissionsStartOnly = true;
RuntimeDirectory = "go-neb";
ExecStart = "${pkgs.go-neb}/bin/go-neb";
User = "go-neb";