1
0
Fork 0

unpackerr: init

This commit is contained in:
Daniel Kempkens 2023-05-21 23:14:53 +02:00
parent 3572bc53b8
commit 1652dfe614
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 36 additions and 0 deletions

View file

@ -31,5 +31,11 @@
owner = "media_user";
group = "media_group";
};
unpackerr-config = {
file = ./unpackerr/config.age;
owner = "media_user";
group = "media_group";
};
};
}

Binary file not shown.

View file

@ -69,4 +69,6 @@ in
"agenix/hosts/mediaserver/tubearchivist/environmentES.age".publicKeys = mediaserver;
"agenix/hosts/mediaserver/aria2/config.age".publicKeys = mediaserver;
"agenix/hosts/mediaserver/unpackerr/config.age".publicKeys = mediaserver;
}

View file

@ -26,6 +26,7 @@ in
(import ../nixos/wireguard-netns.nix (args // { inherit secret; }))
(import ../nixos/wireguard-firewall-mediaserver.nix (args // { inherit secret; }))
../nixos/prowlarr.nix
../nixos/unpackerr.nix
../nixos/sonarr.nix
../nixos/radarr.nix
../nixos/sabnzbd.nix

View file

@ -0,0 +1,27 @@
{ pkgs, config, ... }:
{
systemd.services.unpackerr =
let
mounts = [ "mnt-downloads.mount" ];
in
{
description = "unpackerr service";
requires = mounts;
bindsTo = [ "wg.service" ];
after = [ "wg.service" ] ++ mounts;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "media_user";
Group = "media_group";
NetworkNamespacePath = "/var/run/netns/wg";
BindReadOnlyPaths = [
"/etc/netns/wg/resolv.conf:/etc/resolv.conf:norbind"
"/etc/netns/wg/nsswitch.conf:/etc/nsswitch.conf:norbind"
];
ExecStart = "${pkgs.unpackerr}/bin/unpackerr --config ${config.age.secrets.unpackerr-config.path}";
};
};
}