Deduplicate unprotected service messages via mkUnprotectedMessage

This commit is contained in:
SebastianStork 2025-10-21 22:52:44 +02:00
parent 464b6a7850
commit 66d5263aca
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
4 changed files with 6 additions and 7 deletions

View file

@ -43,17 +43,13 @@ in
assertion = config.custom.services.tailscale.enable;
message = "Syncthing requires tailscale.";
}
{
assertion = cfg.doBackups -> cfg.isServer;
message = "Syncthing backups should only be performed on a server.";
}
{
assertion = cfg.isServer -> (cfg.gui.domain != null);
message = "Running syncthing on a server requires `gui.domain` to be set.";
}
{
assertion = (cfg.gui.domain != null) -> (lib'.isTailscaleDomain cfg.gui.domain);
message = "The syncthing gui should only be exposed on a private network as it isn't yet configured with access controll.";
message = lib'.mkUnprotectedMessage "Syncthing-GUI";
}
];