diff --git a/modules/nixos/bundles/server.nix b/modules/nixos/bundles/server.nix index 315cffb..3789693 100644 --- a/modules/nixos/bundles/server.nix +++ b/modules/nixos/bundles/server.nix @@ -21,6 +21,7 @@ "paperless" "prowlarr" "qbittorrent" + "qui" "radarr" "radicale" "readarr" diff --git a/modules/nixos/features/homepage-dashboard.nix b/modules/nixos/features/homepage-dashboard.nix index c52cdf0..ea29999 100644 --- a/modules/nixos/features/homepage-dashboard.nix +++ b/modules/nixos/features/homepage-dashboard.nix @@ -137,6 +137,13 @@ in }; }; } + { + "qui" = { + "description" = "qBittorrent front end"; + "icon" = "qui.svg"; + "href" = "https://qui.fi33.buzz/"; + }; + } { "qBittorrent" = { "description" = "BitTorrent client"; @@ -315,7 +322,7 @@ in { "Media Management" = { style = "row"; - columns = 4; + columns = 3; useEqualHeights = true; }; } diff --git a/modules/nixos/features/qui.nix b/modules/nixos/features/qui.nix new file mode 100644 index 0000000..f7392f5 --- /dev/null +++ b/modules/nixos/features/qui.nix @@ -0,0 +1,30 @@ +{ + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... +}: +let + port = 5019; +in +{ + environment.systemPackages = [ pkgs.qui ]; + + systemd.user.services.qui = { + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig.ExecStart = "${lib.getExe pkgs.qui} serve"; + + environment = { + QUI__PORT = toString port; + QUI__DATA_DIR = "/srv/qui"; + }; + }; + + services.nginx.virtualHosts."qui.fi33.buzz" = { + forceSSL = true; + useACMEHost = "fi33.buzz"; + locations."/".proxyPass = "http://localhost:${toString port}"; + }; +}