mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 22:28:28 +01:00
Compare commits
No commits in common. "3f882c89c7078216feda585da96b7ee17478b3a7" and "8855886547499c54c92e6ffd7baf5ad018f52a71" have entirely different histories.
3f882c89c7
...
8855886547
2 changed files with 2 additions and 32 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue