init soju
Signed-off-by: cy <cy@cy7.sh>
This commit is contained in:
parent
4f015ecb45
commit
650d3615c3
3 changed files with 26 additions and 0 deletions
|
@ -206,4 +206,6 @@
|
|||
};
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
environment.enableAllTerminfo = true;
|
||||
|
||||
my.soju.enable = true;
|
||||
}
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
imports = [
|
||||
./backup.nix
|
||||
./caddy.nix
|
||||
./soju.nix
|
||||
];
|
||||
}
|
||||
|
|
23
modules/soju.nix
Normal file
23
modules/soju.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue