diff --git a/hosts/chunk/default.nix b/hosts/chunk/default.nix index 577e9b5..4bd50ed 100644 --- a/hosts/chunk/default.nix +++ b/hosts/chunk/default.nix @@ -206,4 +206,6 @@ }; virtualisation.oci-containers.backend = "podman"; environment.enableAllTerminfo = true; + + my.soju.enable = true; } diff --git a/modules/default.nix b/modules/default.nix index 070a96e..9780465 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -3,5 +3,6 @@ imports = [ ./backup.nix ./caddy.nix + ./soju.nix ]; } diff --git a/modules/soju.nix b/modules/soju.nix new file mode 100644 index 0000000..a7a62db --- /dev/null +++ b/modules/soju.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: +let + cfg = config.my.soju; +in +{ + options.my.soju = { + enable = lib.mkEnableOption "soju"; + }; + + config = lib.mkIf cfg.enable { + services.soju = { + enable = true; + # should be fine since caddy will provide TLS + listen = [ "irc+insecure://127.0.0.1:6667" ]; + hostName = "soju.cy7.sh"; + }; + + services.caddy.virtualHosts."soju.cy7.sh".extraConfig = '' + import common + reverse_proxy 127.0.0.1:6667 + ''; + }; +}