Files
nix-config/modules/apps/jackett/default.nix
2024-05-31 16:11:42 -05:00

31 lines
535 B
Nix

{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.jackett;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.port}:9117" ];
volumes = [
"${cfg.configPath}:/config"
"${cfg.downloadsPath}:/downloads"
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}