diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 288842e..69dd3d0 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -24,6 +24,7 @@ htop = true; ollama = false; monitor = true; + teamspeak = true; nextcloud = true; }; forty_two.irc = true; diff --git a/services/self_host.nix b/services/self_host.nix index 37fbbc5..86e423c 100644 --- a/services/self_host.nix +++ b/services/self_host.nix @@ -7,6 +7,9 @@ let monitor = import ./self_host/monitor.nix { inherit inputs config pkgs lib; }; + teamspeak = import ./self_host/teamspeak.nix { + inherit inputs config pkgs lib; + }; ollama = import ./self_host/ollama.nix { inherit inputs config pkgs lib; }; @@ -20,6 +23,7 @@ in nextcloud htop ollama + teamspeak monitor ]; @@ -34,6 +38,11 @@ in default = false; description = "Enable the htop"; }; + teamspeak = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable the teamspeak"; + }; ollama = lib.mkOption { type = lib.types.bool; default = false; diff --git a/services/self_host/monitor.nix b/services/self_host/monitor.nix index 65ed0f3..0c66230 100644 --- a/services/self_host/monitor.nix +++ b/services/self_host/monitor.nix @@ -96,6 +96,8 @@ in "https://nextcloud.enium.eu" "https://htop.enium.eu" "https://monitor.enium.eu" + "https://ts.enium.eu" + "https://monitor.enium.eu" "https://ollama.enium.eu" "http://relance-pas-stp.me:4242" ]; diff --git a/services/self_host/teamspeak.nix b/services/self_host/teamspeak.nix new file mode 100644 index 0000000..aebf66f --- /dev/null +++ b/services/self_host/teamspeak.nix @@ -0,0 +1,23 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.service.selfhost.monitor; +in +{ + config = lib.mkIf cfg { + services = { + teamspeak3 = { + enable = true; + }; + + nginx.virtualHosts."ts.enium.eu" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:9987"; + proxyWebsockets = true; + }; + }; + }; + }; +}