mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 14:19:08 +01:00
Compare commits
3 commits
286388294d
...
7fd21d8cde
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fd21d8cde | |||
| 19ebf53f8b | |||
| 07355b1817 |
2 changed files with 45 additions and 0 deletions
|
|
@ -77,6 +77,11 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "search.${config.custom.networking.overlay.domain}";
|
domain = "search.${config.custom.networking.overlay.domain}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
scrutiny = {
|
||||||
|
enable = true;
|
||||||
|
domain = "scrutiny.${config.custom.networking.overlay.domain}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
40
modules/nixos/web-services/scrutiny.nix
Normal file
40
modules/nixos/web-services/scrutiny.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{ 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;
|
||||||
|
|
||||||
|
persistence.directories = [ "/var/lib/scrutiny" ];
|
||||||
|
|
||||||
|
meta.sites.${cfg.domain} = {
|
||||||
|
title = "Scrutiny";
|
||||||
|
icon = "sh:scrutiny";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue