Compare commits

..

2 commits

Author SHA1 Message Date
cfa3792d93
vps-public: Enable screego 2026-01-22 21:35:13 +01:00
8336c3b5ac
screego: Init module 2026-01-22 21:34:49 +01:00
2 changed files with 37 additions and 3 deletions

View file

@ -41,9 +41,7 @@
caddy.virtualHosts."dav.${sproutedDomain}" = { caddy.virtualHosts."dav.${sproutedDomain}" = {
inherit (config.custom.web-services.radicale) port; inherit (config.custom.web-services.radicale) port;
extraConfig = '' extraConfig = ''
respond /.web/ "Access denied" 403 { respond /.web/ "Access denied" 403 { close }
close
}
''; '';
}; };
}; };
@ -82,6 +80,11 @@
branding.name = "SproutedBin"; branding.name = "SproutedBin";
}; };
screego = {
enable = true;
domain = "mirror.${sproutedDomain}";
};
radicale = { radicale = {
enable = true; enable = true;
domain = "dav.${privateDomain}"; domain = "dav.${privateDomain}";

View file

@ -0,0 +1,31 @@
{ config, lib, ... }:
let
cfg = config.custom.web-services.screego;
in
{
options.custom.web-services.screego = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 5050;
};
};
config = lib.mkIf cfg.enable {
services.screego = {
enable = true;
openFirewall = true;
settings = {
SCREEGO_EXTERNAL_IP = config.custom.networking.underlay.address;
SCREEGO_SERVER_ADDRESS = "127.0.0.1:${toString cfg.port}";
SCREEGO_TURN_ADDRESS = "${config.custom.networking.underlay.address}:3478";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}