chore: reformat jackett

This commit is contained in:
Julien Malka 2024-05-23 18:35:14 +02:00
parent 6a7c0d54e9
commit f352c83f68
Signed by: Luj
GPG key ID: 6FC74C847011FD83

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
with lib; with lib;
let let
cfg = config.luj.jackett; cfg = config.luj.jackett;
@ -22,25 +27,19 @@ in
}; };
nginx.enable = mkEnableOption "activate nginx"; nginx.enable = mkEnableOption "activate nginx";
nginx.subdomain = mkOption { nginx.subdomain = mkOption { type = types.str; };
type = types.str;
};
}; };
config = mkIf cfg.enable ( config = mkIf cfg.enable (mkMerge [
mkMerge [{ {
services.jackett = { services.jackett = {
enable = true; enable = true;
# unstable version to have updated torrent list
package = pkgs.unstable.jackett; package = pkgs.unstable.jackett;
inherit (cfg) user group; inherit (cfg) user group;
}; };
} }
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]); (mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))
]);
} }