mirror of https://gitlab.crans.org/nounous/nixos
Dynamics config try
parent
92af32455b
commit
278496d9ea
|
|
@ -74,4 +74,24 @@ in
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# Override the systemd service to watch a directory instead of the single /nix/store file
|
||||||
|
systemd.services.gatus = {
|
||||||
|
environment = {
|
||||||
|
GATUS_CONFIG_PATH = "/var/lib/gatus/config";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
StateDirectory = "gatus";
|
||||||
|
ExecStartPre = let
|
||||||
|
generatedConfig = (pkgs.formats.yaml { }).generate "gatus-base.yaml" config.services.gatus.settings;
|
||||||
|
in pkgs.writeShellScript "gatus-setup-config" ''
|
||||||
|
mkdir -p /var/lib/gatus/config
|
||||||
|
ln -sf ${generatedConfig} /var/lib/gatus/config/00-base.yaml
|
||||||
|
echo "announcements:
|
||||||
|
- timestamp: "2026-11-12T01:00:00Z"
|
||||||
|
type: outage
|
||||||
|
message: "Investigating elevated latency on EU servers."
|
||||||
|
archived: false" >> /var/lib/gatus/config/99-announcements.yaml
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue