Skip to content

Commit

Permalink
feat(nixos): unpackerr
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Nov 19, 2023
1 parent 7f8f8ef commit 6bfed1a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions machines/media.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

users.users.carlos.packages = with pkgs; [
unrar
unpackerr
];

services.jellyfin = {
Expand Down Expand Up @@ -59,6 +60,30 @@
};
};

systemd.services.unpackerr = {
description = "Unpackerr";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "carlos";
Group = "wheel";
ExecStart =
let
config = pkgs.writeText "unpackerr.conf"
''
[[sonarr]]
api_key = "71c261a86baf491784a60fa7489620fc"
[[radarr]]
api_key = "0042dc1c54444388b0ed680187f11b37"
'';
in
"${pkgs.unpackerr}/bin/unpackerr -c ${config}";
Restart = "on-failure";
};
};

# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
Expand Down

0 comments on commit 6bfed1a

Please sign in to comment.