diff --git a/flake.nix b/flake.nix index 4db3fd1..353369c 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,6 @@ kmonad.nixosModules.default agenix.nixosModule home-manager.nixosModules.home-manager - self.nixosModules.flood { nixpkgs.overlays = [ nur.overlay agenix.overlay ]; } ]; }; @@ -65,8 +64,6 @@ }; }; - nixosModules.flood = import ./modules/flood.nix; - packages.x86_64-linux = { install-iso = nixos-generators.nixosGenerate { system = "x86_64-linux"; diff --git a/hosts/servers/alexandria/services/arr.nix b/hosts/servers/alexandria/services/arr.nix index d307ccd..f2399b7 100644 --- a/hosts/servers/alexandria/services/arr.nix +++ b/hosts/servers/alexandria/services/arr.nix @@ -2,39 +2,6 @@ { services = { - transmission = { - enable = true; - group = "hosted"; - settings = { - download-dir = "/data/torrent_storage/completed"; - incomplete-dir = "/data/torrent_storage/incomplete"; - incomplete-dir-enabled = true; - rpc-authentication-required = false; - rpc-host-whitelist-enabled = true; - rpc-whitelist-enabled = true; - peer-port = 57298; - speed-limit-down = 5000; - speed-limit-down-enabled = true; - speed-limit-up = 500; - speed-limit-up-enabled = true; - alt-speed-down = 5000; - alt-speed-enabled = false; - alt-speed-time-begin = 240; - alt-speed-time-day = 127; - alt-speed-time-enabled = true; - alt-speed-time-end = 480; - alt-speed-up = 1500; - utp-enabled = false; - }; - }; - - flood = { - enable = true; - user = "transmission"; - group = "hosted"; - port = "${config.ports.flood}"; - }; - jellyfin = { enable = true; group = "hosted"; diff --git a/hosts/servers/alexandria/services/containerised.nix b/hosts/servers/alexandria/services/containerised.nix index 56f1585..4caa9db 100644 --- a/hosts/servers/alexandria/services/containerised.nix +++ b/hosts/servers/alexandria/services/containerised.nix @@ -18,7 +18,7 @@ "librespeed" = { image = "lscr.io/linuxserver/librespeed:latest"; environment = { - TZ = "Europe/Berlin"; + TZ = "America/Bahia"; }; ports = [ "${config.ports.librespeed}:80" @@ -27,12 +27,32 @@ "--pull=always" ]; }; + "qflood" = { + image = "cr.hotio.dev/hotio/qflood"; + environment = { + PUID = "1000"; + PGID = "100"; + UMASK = "002"; + TZ = "America/Bahia"; + FLOOD_AUTH = "false"; + }; + volumes = [ + "/data/qflood:/config" + ]; + ports = [ + "${config.ports.flood}:3000" + "${config.ports.qbittorrent}:8080" + ]; + extraOptions = [ + "--pull=always" + ]; + }; "syncthing" = { image = "lscr.io/linuxserver/syncthing:1.20.4"; environment = { PUID = "1000"; PGID = "100"; - TZ = "Europe/Berlin"; + TZ = "America/Bahia"; }; volumes = [ "/data/syncthing/config:/config" diff --git a/hosts/servers/alexandria/services/utility.nix b/hosts/servers/alexandria/services/utility.nix index a8df073..38b6264 100644 --- a/hosts/servers/alexandria/services/utility.nix +++ b/hosts/servers/alexandria/services/utility.nix @@ -25,7 +25,7 @@ group = "hosted"; behindProxy = true; datastorePath = "/data/changedetection"; - port = "${config.ports.changedetection-io}"; + port = lib.toInt "${config.ports.changedetection-io}"; baseURL = "https://detect.baduhai.me"; }; @@ -34,7 +34,7 @@ dataDir = "/data/paperless/data"; mediaDir = "/data/paperless/media"; passwordFile = config.age.secrets.paperless-pass.path; - port = "${config.ports.paperless}"; + port = lib.toInt "${config.ports.paperless}"; consumptionDirIsPublic = true; extraConfig = { PAPERLESS_OCR_LANGUAGE = "eng+por+deu"; @@ -43,7 +43,7 @@ shiori = { enable = true; - port = "${config.ports.shiori}"; + port = lib.toInt "${config.ports.shiori}"; }; n8n.enable = true; diff --git a/hosts/servers/alexandria/services/variables.nix b/hosts/servers/alexandria/services/variables.nix index 637294d..8a7f91f 100644 --- a/hosts/servers/alexandria/services/variables.nix +++ b/hosts/servers/alexandria/services/variables.nix @@ -22,6 +22,7 @@ in jellyfin = mkStringOption "8096"; whoogle = mkStringOption "8007"; flood = mkStringOption "8008"; + qbittorrent = mkStringOption "8009"; sonarr = mkStringOption "8989"; prowlarr = mkStringOption "9696"; }; diff --git a/modules/flood.nix b/modules/flood.nix deleted file mode 100644 index 7505aed..0000000 --- a/modules/flood.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let cfg = config.services.flood; -in { - options = { - services.flood = { - enable = mkEnableOption (lib.mdDoc "Flood"); - - runDir = mkOption { - type = types.str; - default = "/var/lib/flood"; - }; - - port = mkOption { - type = types.port; - default = 3030; - description = '' - The port for the Flood web interface - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Open ports in the firewall for the Flood web interface - ''; - }; - - user = mkOption { - type = types.str; - default = "flood"; - description = lib.mdDoc "User account under which Flood runs."; - }; - - group = mkOption { - type = types.str; - default = "flood"; - description = lib.mdDoc "Group under which Flood runs."; - }; - - package = mkOption { - type = types.package; - default = pkgs.flood; - defaultText = literalExpression "pkgs.flood"; - description = lib.mdDoc '' - Flood package to use. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - systemd.tmpfiles.rules = - [ "d '${cfg.runDir}' 0700 ${cfg.user} ${cfg.group} - -" ]; - - systemd.services.flood = { - enable = true; - description = "Flood torrent UI"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - Type = "simple"; - ExecStart = lib.concatStringsSep " " [ - "${pkgs.flood}/bin/flood" - "--port ${toString cfg.port}" - "--host 0.0.0.0" - "--rundir ${cfg.runDir}" - ]; - User = cfg.user; - Group = cfg.group; - Restart = "on-failure"; - }; - }; - - networking.firewall = - mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; }; - - users.users = mkIf (cfg.user == "flood") { - flood = { - group = cfg.group; - home = cfg.runDir; - uid = config.ids.uids.flood; - }; - }; - - users.groups = - mkIf (cfg.group == "flood") { flood.gid = config.ids.gids.flood; }; - }; -}