From 5db34b518a235847dfa7e275acafd8981cdafa95 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 14 May 2023 02:59:03 +0200 Subject: [PATCH] working on kiosk system --- nixos/components/network/tinc/private.nix | 23 ++++++++++++----------- nixos/machines/chungus/configuration.nix | 1 + nixos/machines/chungus/kiosk.nix | 1 + nixos/machines/chungus/prometheus.nix | 8 ++++---- nixos/machines/chungus/trilium.nix | 14 ++++++++++++++ nixos/machines/cream/packages.nix | 1 + 6 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 nixos/machines/chungus/trilium.nix diff --git a/nixos/components/network/tinc/private.nix b/nixos/components/network/tinc/private.nix index 4160682..bd88fa2 100644 --- a/nixos/components/network/tinc/private.nix +++ b/nixos/components/network/tinc/private.nix @@ -18,26 +18,27 @@ let }; subDomains = { # robi - "transmission.robi" = hosts.robi; - "transmission2.robi" = hosts.robi; - "loki.robi" = hosts.robi; "grafana.robi" = hosts.robi; + "loki.robi" = hosts.robi; "prometheus.robi" = hosts.robi; "sync.robi" = hosts.robi; + "transmission.robi" = hosts.robi; + "transmission2.robi" = hosts.robi; # pepe - "loki.pepe" = hosts.pepe; "grafana.pepe" = hosts.pepe; + "loki.pepe" = hosts.pepe; "prometheus.pepe" = hosts.pepe; - "tts.pepe" = hosts.pepe; "tdarr.pepe" = hosts.pepe; + "tts.pepe" = hosts.pepe; # chungus - "loki.chungus" = hosts.chungus; - "grafana.chungus" = hosts.chungus; - "prometheus.chungus" = hosts.chungus; - "tts.chungus" = hosts.chungus; - "tdarr.chungus" = hosts.chungus; - "sync.chungus" = hosts.chungus; "flix.chungus" = hosts.chungus; + "grafana.chungus" = hosts.chungus; + "loki.chungus" = hosts.chungus; + "prometheus.chungus" = hosts.chungus; + "sync.chungus" = hosts.chungus; + "tdarr.chungus" = hosts.chungus; + "trilium.chungus" = hosts.chungus; + "tts.chungus" = hosts.chungus; }; network = "private"; in diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index 0171d2a..5df5047 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -39,6 +39,7 @@ ./syncthing.nix ./kiosk.nix + #./trilium.nix ]; diff --git a/nixos/machines/chungus/kiosk.nix b/nixos/machines/chungus/kiosk.nix index 2ec79a1..cc844f2 100644 --- a/nixos/machines/chungus/kiosk.nix +++ b/nixos/machines/chungus/kiosk.nix @@ -18,4 +18,5 @@ }; # make sure cage ist starting instead of getty systemd.defaultUnit = "graphical.target"; + } diff --git a/nixos/machines/chungus/prometheus.nix b/nixos/machines/chungus/prometheus.nix index 3c7e3e1..6624501 100644 --- a/nixos/machines/chungus/prometheus.nix +++ b/nixos/machines/chungus/prometheus.nix @@ -88,7 +88,7 @@ targets = [ "localhost:19999" ]; labels = { service = "netdata"; - server = "pepe"; + server = config.networking.hostName; }; } ]; @@ -99,7 +99,7 @@ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; labels = { service = "systemd-exporter"; - server = "pepe"; + server = config.networking.hostName; }; }]; } @@ -109,7 +109,7 @@ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; labels = { service = "node-exporter"; - server = "pepe"; + server = config.networking.hostName; }; }]; } @@ -123,7 +123,7 @@ targets = [ "localhost:8123" ]; labels = { service = "hass"; - server = "pepe"; + server = config.networking.hostName; }; }]; } diff --git a/nixos/machines/chungus/trilium.nix b/nixos/machines/chungus/trilium.nix new file mode 100644 index 0000000..59de5ac --- /dev/null +++ b/nixos/machines/chungus/trilium.nix @@ -0,0 +1,14 @@ +{ config, ... }: +{ + services.trilium-server = { + enable = true; + dataDir = "/srv/trilium"; + instanceName = "chungus"; + host = "10.23.42.28"; + noAuthentication = true; + #nginx = { + # enable = true; + # hostName = "trilium.${config.networking.hostName}.private"; + #}; + }; +} diff --git a/nixos/machines/cream/packages.nix b/nixos/machines/cream/packages.nix index c58800d..89883cf 100644 --- a/nixos/machines/cream/packages.nix +++ b/nixos/machines/cream/packages.nix @@ -104,6 +104,7 @@ in steam-run bitwarden + trilium-desktop sensu-go-cli yq-go