Merge pull request #224549 from mweinelt/go-neb-unit-permissions

nixos/go-neb: Replace PermissionsStartOnly with executable prefix
This commit is contained in:
Martin Weinelt 2023-04-12 22:59:41 +02:00 committed by GitHub
commit 130be87c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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";