mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
alloy: Init module
This commit is contained in:
parent
c8af87f3aa
commit
8b9e37c7ed
1 changed files with 32 additions and 0 deletions
32
modules/system/services/alloy.nix
Normal file
32
modules/system/services/alloy.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ 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.list = [ cfg.port ];
|
||||
};
|
||||
|
||||
services.alloy = {
|
||||
enable = true;
|
||||
extraFlags = [
|
||||
"--server.http.listen-addr=127.0.0.1:${builtins.toString cfg.port}"
|
||||
"--disable-reporting"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue