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";
|
||||
};
|
||||
|
||||
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%";
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.jackett.enable {
|
||||
services.jackett = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.nzbhydra2 = lib.mkIf cfg.nzbhydra.enable {
|
||||
enable = true;
|
||||
};
|
||||
# Jackett wants to eat *all* my RAM if left to its own devices
|
||||
systemd.services.jackett = {
|
||||
serviceConfig = {
|
||||
MemoryHigh = "15%";
|
||||
MemoryMax = "25%";
|
||||
};
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
subdomain = "jackett";
|
||||
port = jackettPort;
|
||||
}
|
||||
{
|
||||
subdomain = "nzbhydra";
|
||||
port = nzbhydraPort;
|
||||
}
|
||||
];
|
||||
};
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
subdomain = "jackett";
|
||||
port = jackettPort;
|
||||
}
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.nzbhydra.enable {
|
||||
services.nzbhydra2 = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
subdomain = "nzbhydra";
|
||||
port = nzbhydraPort;
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue