mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
screego: Init module
This commit is contained in:
parent
3f7b4a894d
commit
8336c3b5ac
1 changed files with 31 additions and 0 deletions
31
modules/system/web-services/screego.nix
Normal file
31
modules/system/web-services/screego.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue