diff --git a/modules/servers/flame.nix b/modules/servers/flame.nix index fa149d5..854b175 100644 --- a/modules/servers/flame.nix +++ b/modules/servers/flame.nix @@ -9,34 +9,32 @@ in { }; config = lib.mkIf config.my.servers.flame.enable { sops.secrets.flame.sopsFile = ../../secrets/env.yaml; - virtualisation.oci-containers = { - containers = { - flame = { - autoStart = true; - image = "pawelmalak/flame"; - ports = [ "${toString port}:${toString port}" ]; - volumes = [ - "${config.my.containerData}/flame:/app/data" - "${config.my.containerSocket}:${config.my.containerSocket}" - ]; - environmentFiles = [ config.sops.secrets.flame.path ]; - environment = { - TZ = "America/Mexico_City"; - PUID = "1000"; - PGID = "100"; - }; + virtualisation.oci-containers.containers = { + flame = { + autoStart = true; + image = "pawelmalak/flame"; + ports = [ "${toString port}:${toString port}" ]; + volumes = [ + "${config.my.containerData}/flame:/app/data" + "${config.my.containerSocket}:${config.my.containerSocket}" + ]; + environmentFiles = [ config.sops.secrets.flame.path ]; + environment = { + TZ = "America/Mexico_City"; + PUID = "1000"; + PGID = "100"; }; - flame-nsfw = { - autoStart = true; - image = "pawelmalak/flame"; - ports = [ "${toString portSecret}:${toString port}" ]; - volumes = [ "${config.my.containerData}/flame-nsfw:/app/data" ]; - environmentFiles = [ config.sops.secrets.flame.path ]; - environment = { - TZ = "America/Mexico_City"; - PUID = "1000"; - PGID = "100"; - }; + }; + flame-nsfw = { + autoStart = true; + image = "pawelmalak/flame"; + ports = [ "${toString portSecret}:${toString port}" ]; + volumes = [ "${config.my.containerData}/flame-nsfw:/app/data" ]; + environmentFiles = [ config.sops.secrets.flame.path ]; + environment = { + TZ = "America/Mexico_City"; + PUID = "1000"; + PGID = "100"; }; }; }; diff --git a/modules/servers/lidarr.nix b/modules/servers/lidarr.nix index aeeaea3..a70ea37 100644 --- a/modules/servers/lidarr.nix +++ b/modules/servers/lidarr.nix @@ -5,30 +5,28 @@ let in { options.my.servers.lidarr.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.servers.lidarr.enable { - virtualisation.oci-containers = { - containers.lidarr = { - autoStart = true; - image = "lscr.io/linuxserver/lidarr:latest"; - ports = [ "${toString port}:${toString port}" ]; - environment = { - TZ = "America/Mexico_City"; - PUID = "1000"; - PGID = "100"; - }; - volumes = [ - "/mnt/pool/multimedia:/data" - "/mnt/pool/multimedia/media/Music:/music" - "/mnt/pool/multimedia/media/MusicVideos:/music-videos" - "${config.my.containerData}/lidarr/files:/config" - "${config.my.containerData}/lidarr/custom-services.d:/custom-services.d" - "${config.my.containerData}/lidarr/custom-cont-init.d:/custom-cont-init.d" - ]; - labels = { - "flame.type" = "application"; - "flame.name" = "Lidarr"; - "flame.url" = url; - "flame.icon" = "music"; - }; + virtualisation.oci-containers.containers.lidarr = { + autoStart = true; + image = "lscr.io/linuxserver/lidarr:latest"; + ports = [ "${toString port}:${toString port}" ]; + environment = { + TZ = "America/Mexico_City"; + PUID = "1000"; + PGID = "100"; + }; + volumes = [ + "/mnt/pool/multimedia:/data" + "/mnt/pool/multimedia/media/Music:/music" + "/mnt/pool/multimedia/media/MusicVideos:/music-videos" + "${config.my.containerData}/lidarr/files:/config" + "${config.my.containerData}/lidarr/custom-services.d:/custom-services.d" + "${config.my.containerData}/lidarr/custom-cont-init.d:/custom-cont-init.d" + ]; + labels = { + "flame.type" = "application"; + "flame.name" = "Lidarr"; + "flame.url" = url; + "flame.icon" = "music"; }; }; services = { diff --git a/modules/servers/maloja.nix b/modules/servers/maloja.nix index ed29e14..69f341a 100644 --- a/modules/servers/maloja.nix +++ b/modules/servers/maloja.nix @@ -6,26 +6,24 @@ in { options.my.servers.maloja.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.servers.maloja.enable { sops.secrets.maloja.sopsFile = ../../secrets/env.yaml; - virtualisation.oci-containers = { - containers.maloja = { - image = "krateng/maloja"; - ports = [ "${toString port}:${toString port}" ]; - environmentFiles = [ config.sops.secrets.maloja.path ]; - environment = { - TZ = "America/Mexico_City"; - MALOJA_TIMEZONE = "-6"; - PUID = "1000"; - PGID = "100"; - MALOJA_DATA_DIRECTORY = "/mljdata"; - MALOJA_SKIP_SETUP = "true"; - }; - volumes = [ "${config.my.containerData}/maloja:/mljdata" ]; - labels = { - "flame.type" = "application"; - "flame.name" = "Maloja"; - "flame.url" = url; - "flame.icon" = "bookmark-music"; - }; + virtualisation.oci-containers.containers.maloja = { + image = "krateng/maloja"; + ports = [ "${toString port}:${toString port}" ]; + environmentFiles = [ config.sops.secrets.maloja.path ]; + environment = { + TZ = "America/Mexico_City"; + MALOJA_TIMEZONE = "-6"; + PUID = "1000"; + PGID = "100"; + MALOJA_DATA_DIRECTORY = "/mljdata"; + MALOJA_SKIP_SETUP = "true"; + }; + volumes = [ "${config.my.containerData}/maloja:/mljdata" ]; + labels = { + "flame.type" = "application"; + "flame.name" = "Maloja"; + "flame.url" = url; + "flame.icon" = "bookmark-music"; }; }; services.nginx = { diff --git a/modules/servers/mealie.nix b/modules/servers/mealie.nix index 7ac5455..ff01565 100644 --- a/modules/servers/mealie.nix +++ b/modules/servers/mealie.nix @@ -7,33 +7,31 @@ in { options.my.servers.mealie.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.servers.mealie.enable { sops.secrets.mealie.sopsFile = ../../secrets/env.yaml; - virtualisation.oci-containers = { - containers.mealie = { - autoStart = true; - image = "ghcr.io/mealie-recipes/mealie:v1.4.0"; - ports = [ "${toString port}:9000" ]; - volumes = [ "${config.my.containerData}/mealie:/app/data/" ]; - environmentFiles = [ config.sops.secrets.mealie.path ]; - environment = { - TZ = "America/Mexico_City"; - ALLOW_SIGNUP = "true"; - PUID = "1000"; - PGID = "100"; - MAX_WORKERS = "1"; - WEB_CONCURRENCY = "1"; - BASE_URL = url; - SMTP_HOST = "smtp.gmail.com"; - SMTP_PORT = "587"; - }; - extraOptions = [ - "--memory=1g" # VA-API (omit for NVENC) - ]; - labels = { - "flame.type" = "application"; - "flame.name" = "Mealie"; - "flame.url" = url; - "flame.icon" = "fridge"; - }; + virtualisation.oci-containers.containers.mealie = { + autoStart = true; + image = "ghcr.io/mealie-recipes/mealie:v1.4.0"; + ports = [ "${toString port}:9000" ]; + volumes = [ "${config.my.containerData}/mealie:/app/data/" ]; + environmentFiles = [ config.sops.secrets.mealie.path ]; + environment = { + TZ = "America/Mexico_City"; + ALLOW_SIGNUP = "true"; + PUID = "1000"; + PGID = "100"; + MAX_WORKERS = "1"; + WEB_CONCURRENCY = "1"; + BASE_URL = url; + SMTP_HOST = "smtp.gmail.com"; + SMTP_PORT = "587"; + }; + extraOptions = [ + "--memory=1g" # VA-API (omit for NVENC) + ]; + labels = { + "flame.type" = "application"; + "flame.name" = "Mealie"; + "flame.url" = url; + "flame.icon" = "fridge"; }; }; services.nginx = { diff --git a/modules/servers/metube.nix b/modules/servers/metube.nix index ad66a6a..9906a49 100644 --- a/modules/servers/metube.nix +++ b/modules/servers/metube.nix @@ -3,18 +3,16 @@ let port = 8881; in { options.my.servers.metube.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.servers.metube.enable { - virtualisation.oci-containers = { - containers.metube = { - image = "ghcr.io/alexta69/metube"; - ports = [ "${toString port}:8081" ]; - volumes = [ - "${config.my.containerData}/metube:/downloads" - "/home/jawz/.local/share/cookies.txt:/cookies.txt" - ]; - environment = { - TZ = "America/Mexico_City"; - YTDL_OPTIONS = ''{"cookiefile":"/cookies.txt"}''; - }; + virtualisation.oci-containers.containers.metube = { + image = "ghcr.io/alexta69/metube"; + ports = [ "${toString port}:8081" ]; + volumes = [ + "${config.my.containerData}/metube:/downloads" + "/home/jawz/.local/share/cookies.txt:/cookies.txt" + ]; + environment = { + TZ = "America/Mexico_City"; + YTDL_OPTIONS = ''{"cookiefile":"/cookies.txt"}''; }; }; services.nginx = { diff --git a/modules/servers/multi-scrobbler.nix b/modules/servers/multi-scrobbler.nix index 1104bcf..50da582 100644 --- a/modules/servers/multi-scrobbler.nix +++ b/modules/servers/multi-scrobbler.nix @@ -7,29 +7,26 @@ in { options.my.servers.multi-scrobbler.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.servers.multi-scrobbler.enable { sops.secrets.multi-scrobbler.sopsFile = ../../secrets/env.yaml; - virtualisation.oci-containers = { - containers.multi-scrobbler = { - image = "foxxmd/multi-scrobbler"; - ports = [ "${toString port}:${toString port}" ]; - environmentFiles = [ config.sops.secrets.multi-scrobbler.path ]; - environment = { - TZ = "America/Mexico_City"; - PUID = "1000"; - PGID = "100"; - BASE_URL = url; - DEEZER_REDIRECT_URI = "http://${config.my.miniserver-ip}:${ - toString port - }/deezer/callback"; - MALOJA_URL = "http://maloja:42010"; - WS_ENABLE = "true"; - }; - volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ]; - labels = { - "flame.type" = "application"; - "flame.name" = "Multi-scrobbler"; - "flame.url" = url; - "flame.icon" = "broadcast"; - }; + virtualisation.oci-containers.containers.multi-scrobbler = { + image = "foxxmd/multi-scrobbler"; + ports = [ "${toString port}:${toString port}" ]; + environmentFiles = [ config.sops.secrets.multi-scrobbler.path ]; + environment = { + TZ = "America/Mexico_City"; + PUID = "1000"; + PGID = "100"; + BASE_URL = url; + DEEZER_REDIRECT_URI = + "http://${config.my.miniserver-ip}:${toString port}/deezer/callback"; + MALOJA_URL = "http://maloja:42010"; + WS_ENABLE = "true"; + }; + volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ]; + labels = { + "flame.type" = "application"; + "flame.name" = "Multi-scrobbler"; + "flame.url" = url; + "flame.icon" = "broadcast"; }; }; services.nginx = { diff --git a/modules/servers/nextcloud.nix b/modules/servers/nextcloud.nix index 2077260..8104859 100644 --- a/modules/servers/nextcloud.nix +++ b/modules/servers/nextcloud.nix @@ -183,44 +183,42 @@ in { }; }; }; - virtualisation.oci-containers = { - containers = { - go-vod = lib.mkIf config.my.servers.go-vod.enable { - autoStart = true; - image = "radialapps/go-vod"; - environment = { - TZ = "America/Mexico_City"; - NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}"; - NVIDIA_VISIBLE_DEVICES = "all"; - }; - volumes = [ "ncdata:/var/www/html:ro" ]; - extraOptions = [ - "--device=/dev/dri" # VA-API (omit for NVENC) - ]; + virtualisation.oci-containers.containers = { + go-vod = lib.mkIf config.my.servers.go-vod.enable { + autoStart = true; + image = "radialapps/go-vod"; + environment = { + TZ = "America/Mexico_City"; + NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}"; + NVIDIA_VISIBLE_DEVICES = "all"; }; - collabora = lib.mkIf config.my.servers.collabora.enable { - autoStart = true; - image = "collabora/code"; - imageFile = pkgs.dockerTools.pullImage { - imageName = "collabora/code"; - imageDigest = - "sha256:1747d1b58ac595df63fb651c4533983bbb556b0a5427f9a14dc4d9e75bda6aff"; - sha256 = "sha256-sIGLGsHMYqkboMlRnSN6eiy+iyKYj+wKvt48Hxirp00="; - }; - ports = [ "9980:9980" ]; - environment = { - TZ = "America/Mexico_City"; - domain = urlSecret; - aliasgroup1 = "${url}:443"; - aliasgroup2 = "cloud.rotehaare.art:443"; - dictionaries = "en_CA en_US es_MX es_ES fr_FR it pt_BR ru"; - extra_params = '' - --o:ssl.enable=false - --o:ssl.termination=true - ''; - }; - extraOptions = [ "--cap-add=MKNOD" ]; + volumes = [ "ncdata:/var/www/html:ro" ]; + extraOptions = [ + "--device=/dev/dri" # VA-API (omit for NVENC) + ]; + }; + collabora = lib.mkIf config.my.servers.collabora.enable { + autoStart = true; + image = "collabora/code"; + imageFile = pkgs.dockerTools.pullImage { + imageName = "collabora/code"; + imageDigest = + "sha256:1747d1b58ac595df63fb651c4533983bbb556b0a5427f9a14dc4d9e75bda6aff"; + sha256 = "sha256-sIGLGsHMYqkboMlRnSN6eiy+iyKYj+wKvt48Hxirp00="; }; + ports = [ "9980:9980" ]; + environment = { + TZ = "America/Mexico_City"; + domain = urlSecret; + aliasgroup1 = "${url}:443"; + aliasgroup2 = "cloud.rotehaare.art:443"; + dictionaries = "en_CA en_US es_MX es_ES fr_FR it pt_BR ru"; + extra_params = '' + --o:ssl.enable=false + --o:ssl.termination=true + ''; + }; + extraOptions = [ "--cap-add=MKNOD" ]; }; }; systemd = lib.mkIf config.my.servers.nextcloud.enableCron { diff --git a/modules/servers/prowlarr.nix b/modules/servers/prowlarr.nix index 66ecdef..efdfec6 100644 --- a/modules/servers/prowlarr.nix +++ b/modules/servers/prowlarr.nix @@ -13,12 +13,10 @@ // { }; }; }; - virtualisation.oci-containers = { - containers.flaresolverr = { - autoStart = true; - image = "ghcr.io/flaresolverr/flaresolverr:latest"; - ports = [ "8191:8191" ]; - }; + virtualisation.oci-containers.containers.flaresolverr = { + autoStart = true; + image = "ghcr.io/flaresolverr/flaresolverr:latest"; + ports = [ "8191:8191" ]; }; }; } diff --git a/modules/servers/ryot.nix b/modules/servers/ryot.nix index 517680b..93252bc 100644 --- a/modules/servers/ryot.nix +++ b/modules/servers/ryot.nix @@ -7,25 +7,22 @@ in { config = lib.mkIf (config.my.servers.ryot.enable && config.my.servers.postgres.enable) { sops.secrets.ryot.sopsFile = ../../secrets/env.yaml; - virtualisation.oci-containers = { - containers.ryot = { - image = "ghcr.io/ignisda/ryot:latest"; - ports = [ "${toString port}:8000" ]; - environmentFiles = [ config.sops.secrets.ryot.path ]; - environment = { - RUST_LOG = "ryot=debug,sea_orm=debug"; - TZ = "America/Mexico_City"; - DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}"; - FRONTEND_INSECURE_COOKIES = "true"; - }; - volumes = - [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ]; - labels = { - "flame.type" = "application"; - "flame.name" = "Ryot"; - "flame.url" = url; - "flame.icon" = "radar"; - }; + virtualisation.oci-containers.containers.ryot = { + image = "ghcr.io/ignisda/ryot:latest"; + ports = [ "${toString port}:8000" ]; + environmentFiles = [ config.sops.secrets.ryot.path ]; + environment = { + RUST_LOG = "ryot=debug,sea_orm=debug"; + TZ = "America/Mexico_City"; + DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}"; + FRONTEND_INSECURE_COOKIES = "true"; + }; + volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ]; + labels = { + "flame.type" = "application"; + "flame.name" = "Ryot"; + "flame.url" = url; + "flame.icon" = "radar"; }; }; services.nginx = {