scrutiny: Init module

This commit is contained in:
SebastianStork 2026-03-17 22:53:39 +01:00
parent 286388294d
commit 07355b1817
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -0,0 +1,38 @@
{ config, lib, ... }:
let
cfg = config.custom.web-services.scrutiny;
in
{
options.custom.web-services.scrutiny = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 8466;
};
};
config = lib.mkIf cfg.enable {
services.scrutiny = {
enable = true;
settings.web.listen = {
host = "127.0.0.1";
inherit (cfg) port;
};
};
systemd.services.scrutiny.enableStrictShellChecks = false;
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.sites.${cfg.domain} = {
title = "Scrutiny";
icon = "sh:scrutiny";
};
};
};
}