modules: services: put modules into folders
This commit is contained in:
parent
836b54b8eb
commit
ac90c5b11a
29 changed files with 28 additions and 28 deletions
43
modules/services/indexers/default.nix
Normal file
43
modules/services/indexers/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Torrent and usenet meta-indexers
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.indexers;
|
||||
|
||||
jackettPort = 9117;
|
||||
nzbhydraPort = 5076;
|
||||
in
|
||||
{
|
||||
options.my.services.indexers = with lib; {
|
||||
jackett.enable = mkEnableOption "Jackett torrent meta-indexer";
|
||||
nzbhydra.enable = mkEnableOption "NZBHydra2 torrent meta-indexer";
|
||||
};
|
||||
|
||||
config = {
|
||||
services.jackett = lib.mkIf cfg.jackett.enable {
|
||||
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 {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
subdomain = "jackett";
|
||||
port = jackettPort;
|
||||
}
|
||||
{
|
||||
subdomain = "nzbhydra";
|
||||
port = nzbhydraPort;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue