mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
32 lines
645 B
Nix
32 lines
645 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.custom.services.alloy;
|
|
in
|
|
{
|
|
options.custom.services.alloy = {
|
|
enable = lib.mkEnableOption "";
|
|
domain = lib.mkOption {
|
|
type = lib.types.nonEmptyStr;
|
|
default = "";
|
|
};
|
|
port = lib.mkOption {
|
|
type = lib.types.port;
|
|
default = 12345;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
meta = {
|
|
domains.list = [ cfg.domain ];
|
|
ports.tcp.list = [ cfg.port ];
|
|
};
|
|
|
|
services.alloy = {
|
|
enable = true;
|
|
extraFlags = [
|
|
"--server.http.listen-addr=localhost:${builtins.toString cfg.port}"
|
|
"--disable-reporting"
|
|
];
|
|
};
|
|
};
|
|
}
|