diff --git a/modules/nixos/bundles/server.nix b/modules/nixos/bundles/server.nix index 80e7013..6eae80a 100644 --- a/modules/nixos/bundles/server.nix +++ b/modules/nixos/bundles/server.nix @@ -18,7 +18,7 @@ in radarr.enable = true; sonarr.enable = true; stirling-pdf.enable = true; - transmission.enable = true; + qbittorrent.enable = true; vaultwarden.enable = true; vscode-server.enable = true; webdav.enable = true; diff --git a/modules/nixos/features/homepage-dashboard.nix b/modules/nixos/features/homepage-dashboard.nix index 439ce4c..54122b4 100644 --- a/modules/nixos/features/homepage-dashboard.nix +++ b/modules/nixos/features/homepage-dashboard.nix @@ -170,15 +170,15 @@ in }; } { - "Stirling PDF" = { - "icon" = "stirling-pdf.png"; - "href" = "https://stirling-pdf.fi33.buzz/"; + "qBittorrent" = { + "icon" = "qbittorrent.png"; + "href" = "https://qbittorrent.fi33.buzz/"; }; } { - "Transmission" = { - "icon" = "transmission.png"; - "href" = "https://transmission.fi33.buzz/"; + "Stirling PDF" = { + "icon" = "stirling-pdf.png"; + "href" = "https://stirling-pdf.fi33.buzz/"; }; } { diff --git a/modules/nixos/features/qbittorrent.nix b/modules/nixos/features/qbittorrent.nix new file mode 100644 index 0000000..1400ac2 --- /dev/null +++ b/modules/nixos/features/qbittorrent.nix @@ -0,0 +1,37 @@ +{ config, lib, ... }: +let + feature = "qbittorrent"; + port = "5005"; +in +{ + config = lib.mkIf config.${feature}.enable { + users.users.qbittorrent.extraGroups = [ "media" ]; + + services = { + # service + qbittorrent = { + enable = true; + webuiPort = lib.toInt port; + profileDir = "/srv"; + group = "media"; + extraArgs = [ + "--confirm-legal-notice" + ]; + }; + + # reverse proxy + nginx = { + virtualHosts."${feature}.fi33.buzz" = { + forceSSL = true; + useACMEHost = "fi33.buzz"; + locations."/" = { + proxyPass = "http://localhost:${port}"; + # proxyWebsockets = true; + }; + }; + }; + }; + }; + + options.${feature}.enable = lib.mkEnableOption "enables ${feature}"; +} diff --git a/modules/nixos/features/transmission.nix b/modules/nixos/features/transmission.nix deleted file mode 100644 index f502082..0000000 --- a/modules/nixos/features/transmission.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - feature = "transmission"; - port = "5008"; -in -{ - config = lib.mkIf config.${feature}.enable { - services = { - transmission = { - enable = true; - package = pkgs.transmission_4; - settings = { - download-dir = "/media/Downloads"; - rpc-host-whitelist-config.${feature}.enable = false; - rpc-port = lib.toInt port; - rpc-whitelist-enable = false; - }; - group = "media"; - webHome = pkgs.flood-for-transmission; - }; - - # reverse proxy - nginx.virtualHosts."${feature}.fi33.buzz" = { - forceSSL = true; - useACMEHost = "fi33.buzz"; - locations."/".proxyPass = "http://localhost:${port}"; - }; - }; - }; - - options.${feature}.enable = lib.mkEnableOption "enables ${feature}"; -}