From cbcccd3d02a8e4cf7efb9379674efab17be696f4 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 1 Feb 2024 20:37:02 -0500 Subject: [PATCH] Infini-SERVER: transfer thelounge to Infini-OPTIPLEX --- hosts/Infini-OPTIPLEX/default.nix | 1 + hosts/Infini-OPTIPLEX/thelounge.nix | 23 +++++++++++++++++++++++ hosts/Infini-SERVER/default.nix | 18 ------------------ hosts/Infini-SERVER/filesystems.nix | 6 ------ modules/modules/services/thelounge.nix | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 hosts/Infini-OPTIPLEX/thelounge.nix diff --git a/hosts/Infini-OPTIPLEX/default.nix b/hosts/Infini-OPTIPLEX/default.nix index 4423138..b934275 100644 --- a/hosts/Infini-OPTIPLEX/default.nix +++ b/hosts/Infini-OPTIPLEX/default.nix @@ -3,6 +3,7 @@ ./hardware-configuration.nix ./filesystems.nix + ./thelounge.nix ./vaultwarden.nix ]; diff --git a/hosts/Infini-OPTIPLEX/thelounge.nix b/hosts/Infini-OPTIPLEX/thelounge.nix new file mode 100644 index 0000000..8d5adde --- /dev/null +++ b/hosts/Infini-OPTIPLEX/thelounge.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +{ + services.nginx.virtualHosts."thelounge.inx.moe" = config.common.nginx.ssl // { + locations."/" = { + proxyPass = "http://localhost:${toString config.services.thelounge.port}"; + }; + }; + + services.thelounge = { + enable = true; + dataDir = "/srv/thelounge"; + plugins = with pkgs.theLoungePlugins; [ + themes.zenburn-monospace + themes.dracula + themes.discordapp + ]; + port = 9786; + extraConfig = { + reverseProxy = true; + }; + }; +} diff --git a/hosts/Infini-SERVER/default.nix b/hosts/Infini-SERVER/default.nix index 18152d2..ddfccc0 100644 --- a/hosts/Infini-SERVER/default.nix +++ b/hosts/Infini-SERVER/default.nix @@ -85,26 +85,8 @@ "nitter.inx.moe" = ssl // { globalRedirect = "twitter.com"; }; - "thelounge.inx.moe" = ssl // { - locations."/" = { - proxyPass = "http://localhost:${toString config.services.thelounge.port}"; - }; - }; }; }; - - thelounge = { - enable = true; - plugins = with pkgs.theLoungePlugins; [ - themes.zenburn-monospace - themes.dracula - themes.discordapp - ]; - port = 9786; - extraConfig = { - reverseProxy = true; - }; - }; }; networking.firewall = { diff --git a/hosts/Infini-SERVER/filesystems.nix b/hosts/Infini-SERVER/filesystems.nix index ae627d9..e47d012 100644 --- a/hosts/Infini-SERVER/filesystems.nix +++ b/hosts/Infini-SERVER/filesystems.nix @@ -53,12 +53,6 @@ in neededForBoot = true; }; - "/persist/var/lib/thelounge" = lib.mkIf (data != null) { - device = data; - fsType = "btrfs"; - options = [ "subvol=root/var/lib/thelounge" ] ++ commonOptions; - }; - "/nix" = { device = main; fsType = "btrfs"; diff --git a/modules/modules/services/thelounge.nix b/modules/modules/services/thelounge.nix index d19b99c..0a165e3 100644 --- a/modules/modules/services/thelounge.nix +++ b/modules/modules/services/thelounge.nix @@ -121,7 +121,7 @@ in "${cfg.dataDir}/config.js"."L+" = { user = "thelounge"; group = "thelounge"; - argument = pkgs.writeText "config.js" configJsData; + argument = "${pkgs.writeText "config.js" configJsData}"; }; };