Compare commits

..

6 commits

Author SHA1 Message Date
Bruno BELANYI 5241bce29b project: readme: mention manual prowlarr step
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-18 19:48:50 +02:00
Bruno BELANYI 4f11cf3a9a machines: porthos: services: enable prowlarr 2021-10-18 19:48:50 +02:00
Bruno BELANYI 927dd9e02a modules: services: indexers: add prowlarr 2021-10-18 19:48:50 +02:00
Bruno BELANYI 9582f8403e flake: bump inputs 2021-10-18 19:48:50 +02:00
Bruno BELANYI df1bc0d0d5 modules: services: indexers: refactor
This is cleaner and more correct.
2021-10-18 19:48:50 +02:00
Bruno BELANYI 760e24a356 modules: services: indexers: fix typo 2021-10-18 19:48:50 +02:00
4 changed files with 62 additions and 39 deletions

View file

@ -17,7 +17,7 @@ Secondly, take care of a few manual steps:
* Configure Gitea and Drone * Configure Gitea and Drone
* Configure Lohr webhook and SSH key * Configure Lohr webhook and SSH key
* Configure Jellyfin * Configure Jellyfin
* Configure Jackett and NZBHydra2 * Configure Prowlarr,Jackett and NZBHydra2
* Configure Sonarr, Radarr, Bazarr * Configure Sonarr, Radarr, Bazarr
* Configure Transmission's webui port * Configure Transmission's webui port
* Configure Quassel user * Configure Quassel user

View file

@ -44,11 +44,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1633296444, "lastModified": 1634230035,
"narHash": "sha256-DnC7yVyoYFSsvFze16AWDa5iSHgtT1MbDGgp8rSC3H4=", "narHash": "sha256-tS0dyWxVgb79Jk8elMthWv/oycj/Q4HHDoNL5V43kz8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "099cbcf13e8219f07b493980a66fe64df0e32d09", "rev": "309808afbc2a07e340067f66029a4202b4c4b959",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -60,11 +60,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1633263894, "lastModified": 1634172192,
"narHash": "sha256-InuWViZr3SL8PqRROkWhmSd3N8gGkiP7YaA7BRdjmhk=", "narHash": "sha256-FBF4U/T+bMg4sEyT/zkgasvVquGzgdAf4y8uCosKMmo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "01f2f2842aaa7f3af957fef93439d639e6941e6c", "rev": "2cf9db0e3d45b9d00f16f2836cb1297bcadc475e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,11 +76,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1633342505, "lastModified": 1634283744,
"narHash": "sha256-UgXnO+jX6V33mtbFgQKPLndNQid1DqOnMcsPlxqeWdk=", "narHash": "sha256-XqRqt1RbEz6MAO1ZkAkcjNZTJCOJ+3LJJ2JWyEkUXsQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "061e44abde1dc11b10ff93fe6a388272850f473c", "rev": "2dbf2b986c523b728ead324baaba9e0d28322557",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -100,11 +100,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1631170176, "lastModified": 1633788342,
"narHash": "sha256-RLN/kur2Kpxt0cJp0Fms8ixuGpT8IHX0OpeQ8u8f0X4=", "narHash": "sha256-wx+aRtR5FwbMOV/0N3PSC4au92aXl6tfwHOk4xgYXRQ=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "3ed0e618cebc1ff291c27b749cf7568959cac028", "rev": "475b1f7f7ddcb6415e6624a68c4fe90f55ee9e73",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -44,6 +44,7 @@ in
indexers = { indexers = {
jackett.enable = true; jackett.enable = true;
nzbhydra.enable = true; nzbhydra.enable = true;
prowlarr.enable = true;
}; };
# Jellyfin media server # Jellyfin media server
jellyfin.enable = true; jellyfin.enable = true;

View file

@ -5,39 +5,61 @@ let
jackettPort = 9117; jackettPort = 9117;
nzbhydraPort = 5076; nzbhydraPort = 5076;
prowlarrPort = 9696;
in in
{ {
options.my.services.indexers = with lib; { options.my.services.indexers = with lib; {
jackett.enable = mkEnableOption "Jackett torrent meta-indexer"; jackett.enable = mkEnableOption "Jackett torrent meta-indexer";
nzbhydra.enable = mkEnableOption "NZBHydra2 torrent meta-indexer"; nzbhydra.enable = mkEnableOption "NZBHydra2 usenet meta-indexer";
prowlarr.enable = mkEnableOption "Prowlarr torrent & usenet meta-indexer";
}; };
config = { config = lib.mkMerge [
services.jackett = lib.mkIf cfg.jackett.enable { (lib.mkIf cfg.jackett.enable {
enable = true; services.jackett = {
}; enable = true;
# Jackett wants to eat *all* my RAM if left to its own devices
systemd.services.jackett = {
serviceConfig = {
MemoryHigh = "15%";
MemoryMax = "25%";
}; };
};
services.nzbhydra2 = lib.mkIf cfg.nzbhydra.enable { # Jackett wants to eat *all* my RAM if left to its own devices
enable = true; systemd.services.jackett = {
}; serviceConfig = {
MemoryHigh = "15%";
MemoryMax = "25%";
};
};
my.services.nginx.virtualHosts = [ my.services.nginx.virtualHosts = [
{ {
subdomain = "jackett"; subdomain = "jackett";
port = jackettPort; port = jackettPort;
} }
{ ];
subdomain = "nzbhydra"; })
port = nzbhydraPort;
} (lib.mkIf cfg.nzbhydra.enable {
]; services.nzbhydra2 = {
}; enable = true;
};
my.services.nginx.virtualHosts = [
{
subdomain = "nzbhydra";
port = nzbhydraPort;
}
];
})
(lib.mkIf cfg.prowlarr.enable {
services.prowlarr = {
enable = true;
};
my.services.nginx.virtualHosts = [
{
subdomain = "prowlarr";
port = prowlarrPort;
}
];
})
];
} }