1 files changed, 34 insertions, 4 deletions
diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix
index cc5afae..06f84c9 100644
--- a/host/Rory-desktop/configuration.nix
+++ b/host/Rory-desktop/configuration.nix
@@ -29,7 +29,7 @@ args@{
./optional/gui/hyprland.nix
./services/libvirt.nix
-# ./services/rabbitmq.nix
+ # ./services/rabbitmq.nix
#./services/edu/mongodb.nix
#./optional/gui/x11.nix
./services/printing.nix
@@ -42,7 +42,11 @@ args@{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
- binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" "riscv32-linux" ];
+ binfmt.emulatedSystems = [
+ "aarch64-linux"
+ "riscv64-linux"
+ "riscv32-linux"
+ ];
loader = {
grub = {
configurationLimit = 10;
@@ -264,7 +268,7 @@ args@{
# };
monitoring = {
- monitorAll = false;
+ monitorAll = true;
localPrometheus = true;
exposePrometheus = true;
localGrafana = true;
@@ -272,6 +276,10 @@ args@{
nginxHost = "monitoring.localhost";
nginxSsl = false;
};
+
+ systemd.services."grafana".serviceConfig.LoadCredential = [
+ "secret_key:/data/secrets/grafana-secret-key"
+ ];
networking.hosts."127.0.0.1" = builtins.attrNames config.services.nginx.virtualHosts;
@@ -308,7 +316,29 @@ args@{
];
};
-
+ services.prometheus.scrapeConfigs = [
+ {
+ job_name = "spacebar-dev-api";
+ scrape_interval = "${toString config.monitoring.prometheusScrapeInterval}s";
+ static_configs = [
+ { targets = [ "localhost:3001" ]; }
+ ];
+ }
+ {
+ job_name = "spacebar-dev-gateway";
+ scrape_interval = "${toString config.monitoring.prometheusScrapeInterval}s";
+ static_configs = [
+ { targets = [ "localhost:3002" ]; }
+ ];
+ }
+ {
+ job_name = "spacebar-dev-cdn";
+ scrape_interval = "${toString config.monitoring.prometheusScrapeInterval}s";
+ static_configs = [
+ { targets = [ "localhost:3003" ]; }
+ ];
+ }
+ ];
console = {
earlySetup = true;
|