28 lines
772 B
Nix
28 lines
772 B
Nix
|
{ pkgs, ... }:
|
||
|
{
|
||
|
|
||
|
users.users."nixos-validator" = {
|
||
|
isSystemUser = true;
|
||
|
group = "nixos-validator";
|
||
|
};
|
||
|
|
||
|
users.groups."nixos-validator" = {};
|
||
|
|
||
|
systemd.services."prometheus-nixos-validator" = {
|
||
|
wantedBy = [ "multi-user.target" ];
|
||
|
after = [ "network.target" ];
|
||
|
serviceConfig = {
|
||
|
Restart = "always";
|
||
|
PrivateTmp = true;
|
||
|
WorkingDirectory = "/tmp";
|
||
|
RuntimeDirectory = "prometheus-nixos-validator";
|
||
|
User = "nixos-validator";
|
||
|
Group = "nixos-validator";
|
||
|
ExecStart = ''
|
||
|
${pkgs.nixos-exporter}/bin/nixos-exporter --listen [::]:9153 validator --prometheus-url "http://[::1]:9090" --prometheus-query-tag-template "instance=\"{}.net.clerie.de\"" --hydra-url "https://hydra.clerie.de"
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
}
|