aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-10-25 08:03:51 +0100
committerMartin Fischer <martin@push-f.com>2026-10-26 16:49:21 +0100
commit31b28a7c23825385f1f2990dbaa810264079af5a (patch)
tree9a3312b0296f7f3c1c39bfec3fb026d1350c0b68
parentb9491b33db49da25439be63ae74f24ede8155613 (diff)
refactor: move local service options under local.services
-rw-r--r--nixos/hosts/ev/default.nix16
-rw-r--r--nixos/hosts/ev/exporters.nix4
-rw-r--r--nixos/hosts/ev/home-automation.nix4
-rw-r--r--nixos/hosts/ev/kodi.nix4
-rw-r--r--nixos/hosts/ev/miniflux.nix4
-rw-r--r--nixos/hosts/ev/navidrome.nix4
-rw-r--r--nixos/hosts/ev/private.nix4
-rw-r--r--nixos/hosts/ev/qbittorrent.nix4
-rw-r--r--nixos/hosts/tente/default.nix16
-rw-r--r--nixos/hosts/tente/exporters.nix4
-rw-r--r--nixos/hosts/tente/git-web.nix4
-rw-r--r--nixos/hosts/tente/gitolite.nix4
-rw-r--r--nixos/hosts/tente/grafana.nix8
-rw-r--r--nixos/hosts/tente/headscale.nix4
-rw-r--r--nixos/hosts/tente/web-personal.nix4
-rw-r--r--nixos/shared/monitoring.nix4
-rw-r--r--nixos/shared/restic-database-backups.nix4
17 files changed, 48 insertions, 48 deletions
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;
};
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index 085924f..5e7b278 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -95,17 +95,17 @@ in
# comes with a pre-configured SSH jail
services.fail2ban.enable = true;
- gitolite = {
+ local.services.gitolite = {
dataDir = gitoliteDataDir;
user = "git";
group = "git";
};
- grafana = {
+ local.services.grafana = {
port = ports.grafana;
};
- headscale = {
+ local.services.headscale = {
domain = "tailscale.${baseDomain}";
port = ports.headscale;
};
@@ -142,12 +142,12 @@ in
delaycompress = false;
};
- web-personal = {
+ local.services.web-personal = {
domain = baseDomain;
dir = "/srv/www/${baseDomain}/current"; # not managed via Nix
};
- gitWeb = {
+ local.services.git-web = {
domain = "git.${baseDomain}";
reposDir = reposDir;
user = "cgit";
@@ -229,7 +229,7 @@ in
# Monitoring
- exporters = {
+ local.services.exporters = {
sqlExporterPort = ports.prometheusSqlExporter;
storageboxExporterPort = ports.prometheusStorageboxExporter;
};
@@ -253,7 +253,7 @@ in
};
};
- monitoring = {
+ local.services.monitoring = {
alloyUiPort = ports.grafanaAlloy;
lokiPort = ports.grafanaLoki;
lokiRetentionStream = [
@@ -309,7 +309,7 @@ in
age.secrets.restic-db.file = ./secrets/restic-db.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/tente/exporters.nix b/nixos/hosts/tente/exporters.nix
index 0eb9199..f5a719d 100644
--- a/nixos/hosts/tente/exporters.nix
+++ b/nixos/hosts/tente/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/tente/git-web.nix b/nixos/hosts/tente/git-web.nix
index 9271697..9e8063c 100644
--- a/nixos/hosts/tente/git-web.nix
+++ b/nixos/hosts/tente/git-web.nix
@@ -1,11 +1,11 @@
{ config, lib, pkgs, ... }:
let
- cfg = config.gitWeb;
+ cfg = config.local.services.git-web;
helpers = import ../../helpers.nix { inherit config lib pkgs; };
in
{
- options.gitWeb = {
+ options.local.services.git-web = {
domain = lib.mkOption {
type = lib.types.str;
};
diff --git a/nixos/hosts/tente/gitolite.nix b/nixos/hosts/tente/gitolite.nix
index f2959e5..4ded913 100644
--- a/nixos/hosts/tente/gitolite.nix
+++ b/nixos/hosts/tente/gitolite.nix
@@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }:
let
- cfg = config.gitolite;
+ cfg = config.local.services.gitolite;
in
{
- options.gitolite = {
+ options.local.services.gitolite = {
user = lib.mkOption {
type = lib.types.str;
};
diff --git a/nixos/hosts/tente/grafana.nix b/nixos/hosts/tente/grafana.nix
index 3d7812c..250af83 100644
--- a/nixos/hosts/tente/grafana.nix
+++ b/nixos/hosts/tente/grafana.nix
@@ -1,12 +1,12 @@
{ config, lib, pkgs, ... }:
let
- cfg = config.grafana;
+ cfg = config.local.services.grafana;
ports = import ./ports.nix;
evPorts = import ../ev/ports.nix;
in
{
- options.grafana = {
+ options.local.services.grafana = {
port = lib.mkOption {
type = lib.types.int;
};
@@ -42,13 +42,13 @@ in
{
name = "Prometheus Tente";
type = "prometheus";
- url = "http://${config.services.prometheus.listenAddress}:${toString config.monitoring.prometheusPort}";
+ url = "http://${config.services.prometheus.listenAddress}:${toString config.local.services.monitoring.prometheusPort}";
}
{
name = "Loki Tente";
type = "loki";
access = "proxy";
- url = "http://127.0.0.1:${toString config.monitoring.lokiPort}";
+ url = "http://127.0.0.1:${toString config.local.services.monitoring.lokiPort}";
}
{
name = "Prometheus Ev";
diff --git a/nixos/hosts/tente/headscale.nix b/nixos/hosts/tente/headscale.nix
index 7b9544e..8ee82fa 100644
--- a/nixos/hosts/tente/headscale.nix
+++ b/nixos/hosts/tente/headscale.nix
@@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }:
let
- cfg = config.headscale;
+ cfg = config.local.services.headscale;
in
{
- options.headscale = {
+ options.local.services.headscale = {
port = lib.mkOption {
type = lib.types.int;
};
diff --git a/nixos/hosts/tente/web-personal.nix b/nixos/hosts/tente/web-personal.nix
index 5bc6362..3d83176 100644
--- a/nixos/hosts/tente/web-personal.nix
+++ b/nixos/hosts/tente/web-personal.nix
@@ -1,11 +1,11 @@
{ config, lib, pkgs, ... }:
let
- cfg = config.web-personal;
+ cfg = config.local.services.web-personal;
helpers = import ../../helpers.nix { inherit config lib pkgs; };
in
{
- options.web-personal = {
+ options.local.services.web-personal = {
domain = lib.mkOption {
type = lib.types.str;
};
diff --git a/nixos/shared/monitoring.nix b/nixos/shared/monitoring.nix
index ede2189..80486c4 100644
--- a/nixos/shared/monitoring.nix
+++ b/nixos/shared/monitoring.nix
@@ -1,11 +1,11 @@
{ config, lib, pkgs, ... }:
let
- cfg = config.monitoring;
+ cfg = config.local.services.monitoring;
helpers = import ../helpers.nix { inherit config lib pkgs; };
in
{
- options.monitoring = {
+ options.local.services.monitoring = {
lokiPort = lib.mkOption {
type = lib.types.int;
};
diff --git a/nixos/shared/restic-database-backups.nix b/nixos/shared/restic-database-backups.nix
index f1f6f36..79af4a0 100644
--- a/nixos/shared/restic-database-backups.nix
+++ b/nixos/shared/restic-database-backups.nix
@@ -3,10 +3,10 @@
with lib;
let
- cfg = config.restic-database-backups;
+ cfg = config.local.services.restic-database-backups;
in
{
- options.restic-database-backups = {
+ options.local.services.restic-database-backups = {
repository = mkOption {
type = types.str;
description = "Restic repository URL.";