1
0
Fork 0
This commit is contained in:
Daniel Kempkens 2023-04-18 16:03:31 +02:00
parent cdc573ba0e
commit 25041f3cf7
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -1,18 +1,20 @@
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
services.sabnzbd = { # The nix-provided options force a sabnzbd-user to a certain degree
enable = true;
user = "media_user";
group = "media_group";
};
systemd.services.sabnzbd = { systemd.services.sabnzbd = {
description = "sabnzbd server";
bindsTo = [ "wg.service" ]; bindsTo = [ "wg.service" ];
after = lib.mkForce [ "wg.service" ]; after = [ "wg.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
Type = "forking";
GuessMainPID = "no";
User = "media_user";
Group = "media_group";
NetworkNamespacePath = "/var/run/netns/wg"; NetworkNamespacePath = "/var/run/netns/wg";
ExecStart = "${pkgs.sabnzbd}/bin/sabnzbd -d -f /var/lib/sabnzbd/sabnzbd.ini";
}; };
}; };