modules: services: indexers: refactor
This is cleaner and more correct.
This commit is contained in:
parent
760e24a356
commit
df1bc0d0d5
|
@ -12,32 +12,39 @@ in
|
||||||
nzbhydra.enable = mkEnableOption "NZBHydra2 usenet meta-indexer";
|
nzbhydra.enable = mkEnableOption "NZBHydra2 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;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue