mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
nixos/peerflix: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
0672f867bc
commit
021b287b84
@ -39,6 +39,10 @@ in {
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' - peerflix - - -"
|
||||
];
|
||||
|
||||
systemd.services.peerflix = {
|
||||
description = "Peerflix Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@ -47,13 +51,11 @@ in {
|
||||
|
||||
preStart = ''
|
||||
mkdir -p "${cfg.stateDir}"/{torrents,.config/peerflix-server}
|
||||
if [ "$(id -u)" = 0 ]; then chown -R peerflix "${cfg.stateDir}"; fi
|
||||
ln -fs "${configFile}" "${cfg.stateDir}/.config/peerflix-server/config.json"
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.nodePackages.peerflix-server}/bin/peerflix-server";
|
||||
PermissionsStartOnly = true;
|
||||
User = "peerflix";
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user