Compare commits

..

No commits in common. "3f882c89c7078216feda585da96b7ee17478b3a7" and "8855886547499c54c92e6ffd7baf5ad018f52a71" have entirely different histories.

2 changed files with 2 additions and 32 deletions

View file

@ -25,9 +25,6 @@ in
caddy = lib.mkEnableOption "" // { caddy = lib.mkEnableOption "" // {
default = config.services.caddy.enable; default = config.services.caddy.enable;
}; };
comin = lib.mkEnableOption "" // {
default = config.services.comin.enable;
};
}; };
}; };
@ -112,20 +109,6 @@ in
} }
''; '';
}; };
"alloy/comin-metrics.alloy" = {
enable = cfg.collect.metrics.comin;
text = ''
prometheus.scrape "comin" {
targets = [{
__address__ = "localhost:${toString config.custom.services.comin.metricsPort}",
job = "comin",
instance = constants.hostname,
}]
forward_to = [prometheus.remote_write.default.receiver]
scrape_interval = "30s"
}
'';
};
}; };
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port; custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;

View file

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