From 748d3282d351107723e79060a9471b08e66c4670 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 30 Sep 2026 10:59:24 +0200 Subject: refactor: move absolute path imports to private.nix --- nixos/hosts/ev/private.nix | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 nixos/hosts/ev/private.nix (limited to 'nixos/hosts/ev/private.nix') diff --git a/nixos/hosts/ev/private.nix b/nixos/hosts/ev/private.nix new file mode 100644 index 0000000..a5404fc --- /dev/null +++ b/nixos/hosts/ev/private.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, ... }: + +let + ports = import ./ports.nix; +in +{ + imports = [ + ./default.nix + # Not yet published; will be eventually. + /home/martin/repos/exercise-log/service.nix + /home/martin/repos/hosehawk/services/hosenest.nix + /home/martin/repos/hosehawk/services/hosehawk.nix + ]; + + exerciseLog = { + enable = true; + port = ports.exerciseLog; + }; + + services.hosenest = { + enable = true; + port = ports.hosehawk; + }; + + services.hosehawk = { + enable = true; + hosenestUrl = "http://localhost:${toString ports.hosehawk}/"; + prometheusPort = ports.prometheusHoseHawk; + }; + + monitoring.prometheusScrapeConfigs = [ + { + job_name = "exercise-log"; + scrape_interval = "10m"; + static_configs = [{ + targets = ["localhost:${toString ports.exerciseLog}"]; + }]; + } + { + job_name = "hosehawk"; + static_configs = [{ + targets = ["localhost:${toString ports.prometheusHoseHawk}"]; + }]; + } + ]; + + restic-database-backups.sqliteDatabases = { + exercise-log = "/var/lib/exercise-log/database.sqlite"; + }; +} -- cgit v1.3.1