nixos-config/modules/nixos/services/comin.nix
2026-03-03 18:45:34 +01:00

35 lines
658 B
Nix

{
config,
inputs,
lib,
...
}:
let
cfg = config.custom.services.comin;
in
{
imports = [ inputs.comin.nixosModules.comin ];
options.custom.services.comin = {
enable = lib.mkEnableOption "";
metricsPort = lib.mkOption {
type = lib.types.port;
default = 4243;
};
};
config = lib.mkIf cfg.enable {
services.comin = {
enable = true;
remotes = lib.singleton {
name = "origin";
url = "https://github.com/SebastianStork/nixos-config.git";
branches.main.name = "deploy";
};
};
exporter = {
listen_address = "127.0.0.1";
port = cfg.metricsPort;
};
};
}