init soju

Signed-off-by: cy <cy@cy7.sh>
This commit is contained in:
cy 2025-01-30 10:51:47 -05:00
parent 4f015ecb45
commit 650d3615c3
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
3 changed files with 26 additions and 0 deletions

View file

@ -206,4 +206,6 @@
};
virtualisation.oci-containers.backend = "podman";
environment.enableAllTerminfo = true;
my.soju.enable = true;
}

View file

@ -3,5 +3,6 @@
imports = [
./backup.nix
./caddy.nix
./soju.nix
];
}

23
modules/soju.nix Normal file
View file

@ -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
'';
};
}