update nas docker stuff

This commit is contained in:
mjallen18
2024-05-14 11:21:06 -05:00
parent 4c1a95d864
commit 840c7a183c
6 changed files with 208 additions and 20 deletions

View File

@@ -0,0 +1,23 @@
{ 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;
};
};
};
}

View File

@@ -0,0 +1,51 @@
{ lib, ... }:
with lib; {
options.nas-apps.jackett = {
enable = mkEnableOption "jackett docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "9117";
};
name = mkOption {
type = types.str;
default = "jackett";
};
image = mkOption {
type = types.str;
default = "linuxserver/jackett";
};
configPath = mkOption {
type = types.str;
default = "/mnt/ssd/nix-app-data/jackett";
};
downloadsPath = mkOption {
type = types.str;
default = "/mnt/ssd/ssd_app_data/downloads";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
};
}