mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
26 lines
697 B
Nix
26 lines
697 B
Nix
{
|
|
lib,
|
|
gensokyo-zone,
|
|
...
|
|
}: let
|
|
inherit (gensokyo-zone.lib) mapAlmostOptionDefaults mkAlmostOptionDefault;
|
|
inherit (lib.modules) mkIf;
|
|
in {
|
|
config.exports.services.vouch-proxy = {config, ...}: {
|
|
id = mkAlmostOptionDefault "login";
|
|
defaults.port.listen = mkAlmostOptionDefault "localhost";
|
|
nixos = {
|
|
serviceAttr = "vouch-proxy";
|
|
assertions = mkIf config.enable [
|
|
(nixosConfig: {
|
|
assertion = config.ports.default.port == nixosConfig.services.vouch-proxy.settings.vouch.port;
|
|
message = "port mismatch";
|
|
})
|
|
];
|
|
};
|
|
ports.default = mapAlmostOptionDefaults {
|
|
port = 30746;
|
|
protocol = "http";
|
|
};
|
|
};
|
|
}
|