From ebbbdf264eb5d26701012305eb53f2b295087fb6 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 25 Oct 2026 08:03:51 +0100 Subject: refactor: move local service options under local.services --- nixos/hosts/ev/default.nix | 16 ++++++++-------- nixos/hosts/ev/exporters.nix | 4 ++-- nixos/hosts/ev/home-automation.nix | 4 ++-- nixos/hosts/ev/kodi.nix | 4 ++-- nixos/hosts/ev/miniflux.nix | 4 ++-- nixos/hosts/ev/navidrome.nix | 4 ++-- nixos/hosts/ev/private.nix | 4 ++-- nixos/hosts/ev/qbittorrent.nix | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) (limited to 'nixos/hosts/ev') diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix index bf64198..87097f1 100644 --- a/nixos/hosts/ev/default.nix +++ b/nixos/hosts/ev/default.nix @@ -156,20 +156,20 @@ in ]; }; - home-automation = { + local.services.home-automation = { zigbee2mqttPort = ports.zigbee2mqtt; zigbeeSerialPort = "/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_e2fed465c59ded11962fd7a5a7669f5d-if00-port0"; }; - kodi = { + local.services.kodi = { user = "kodi"; }; - miniflux = { + local.services.miniflux = { port = ports.miniflux; }; - navidrome = { + local.services.navidrome = { port = ports.navidrome; musicDir = "/mnt/personal/music"; }; @@ -195,7 +195,7 @@ in ensureDefaultPrinter = "Brother"; }; - qbittorrent = { + local.services.qbittorrent = { user = "library"; webUiPort = ports.qbittorrent; networkNamespace = "se"; @@ -203,11 +203,11 @@ in # Monitoring - exporters = { + local.services.exporters = { sqlExporterPort = ports.prometheusSqlExporter; }; - monitoring = { + local.services.monitoring = { alloyUiPort = ports.grafanaAlloy; lokiPort = ports.grafanaLoki; prometheusPort = ports.prometheus; @@ -226,7 +226,7 @@ in age.secrets.restic-db.file = ./secrets/restic-db.age; age.secrets.restic-media.file = ./secrets/restic-media.age; - restic-database-backups = { + local.services.restic-database-backups = { repository = "sftp://${backupHost}:23" + "/db"; passwordFile = config.age.secrets.restic-db.path; postgresDatabases = [ diff --git a/nixos/hosts/ev/exporters.nix b/nixos/hosts/ev/exporters.nix index aa4c773..a501394 100644 --- a/nixos/hosts/ev/exporters.nix +++ b/nixos/hosts/ev/exporters.nix @@ -2,10 +2,10 @@ let helpers = import ../../shared/postgres-collectors.nix { inherit config lib pkgs; }; - cfg = config.exporters; + cfg = config.local.services.exporters; in { - options.exporters = { + options.local.services.exporters = { sqlExporterPort = lib.mkOption { type = lib.types.int; }; diff --git a/nixos/hosts/ev/home-automation.nix b/nixos/hosts/ev/home-automation.nix index fe123a7..58b3590 100644 --- a/nixos/hosts/ev/home-automation.nix +++ b/nixos/hosts/ev/home-automation.nix @@ -4,10 +4,10 @@ { config, lib, pkgs, ... }: let - cfg = config.home-automation; + cfg = config.local.services.home-automation; in { - options.home-automation = { + options.local.services.home-automation = { zigbee2mqttPort = lib.mkOption { type = lib.types.int; }; diff --git a/nixos/hosts/ev/kodi.nix b/nixos/hosts/ev/kodi.nix index 27a5bd1..9d19b31 100644 --- a/nixos/hosts/ev/kodi.nix +++ b/nixos/hosts/ev/kodi.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: let - cfg = config.kodi; + cfg = config.local.services.kodi; kodi-package = pkgs.kodi-gbm.withPackages (kodiPkgs: with kodiPkgs; [ joystick ]); in { - options.kodi = { + options.local.services.kodi = { user = lib.mkOption { type = lib.types.str; }; diff --git a/nixos/hosts/ev/miniflux.nix b/nixos/hosts/ev/miniflux.nix index 73bdf98..7bc824e 100644 --- a/nixos/hosts/ev/miniflux.nix +++ b/nixos/hosts/ev/miniflux.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.miniflux; + cfg = config.local.services.miniflux; in { - options.miniflux = { + options.local.services.miniflux = { port = lib.mkOption { type = lib.types.int; }; diff --git a/nixos/hosts/ev/navidrome.nix b/nixos/hosts/ev/navidrome.nix index edfa290..8040fa3 100644 --- a/nixos/hosts/ev/navidrome.nix +++ b/nixos/hosts/ev/navidrome.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.navidrome; + cfg = config.local.services.navidrome; in { - options.navidrome = { + options.local.services.navidrome = { port = lib.mkOption { type = lib.types.port; }; diff --git a/nixos/hosts/ev/private.nix b/nixos/hosts/ev/private.nix index a5404fc..651e0f9 100644 --- a/nixos/hosts/ev/private.nix +++ b/nixos/hosts/ev/private.nix @@ -28,7 +28,7 @@ in prometheusPort = ports.prometheusHoseHawk; }; - monitoring.prometheusScrapeConfigs = [ + local.services.monitoring.prometheusScrapeConfigs = [ { job_name = "exercise-log"; scrape_interval = "10m"; @@ -44,7 +44,7 @@ in } ]; - restic-database-backups.sqliteDatabases = { + local.services.restic-database-backups.sqliteDatabases = { exercise-log = "/var/lib/exercise-log/database.sqlite"; }; } diff --git a/nixos/hosts/ev/qbittorrent.nix b/nixos/hosts/ev/qbittorrent.nix index 6216eac..a0f5b4c 100644 --- a/nixos/hosts/ev/qbittorrent.nix +++ b/nixos/hosts/ev/qbittorrent.nix @@ -2,10 +2,10 @@ let helpers = import ../../helpers.nix { inherit config lib pkgs; }; - cfg = config.qbittorrent; + cfg = config.local.services.qbittorrent; in { - options.qbittorrent = { + options.local.services.qbittorrent = { user = lib.mkOption { type = lib.types.str; }; -- cgit v1.3.1