diff --git a/flake.nix b/flake.nix index 5d4a5c04..6ddc0a4e 100644 --- a/flake.nix +++ b/flake.nix @@ -47,7 +47,10 @@ # Declare a generic configuration using the $hostname variable: ${hostname} = lib.nixosSystem { inherit system; - specialArgs = { inherit unstable; }; + specialArgs = { + inherit unstable; + inherit hostname; + }; modules = [ # Configuration Imports ./hosts/${hostname}/hardware-configuration.nix # Hardware Configuration diff --git a/services/promtail.nix b/services/promtail.nix index 2200ba7b..0fd8602c 100644 --- a/services/promtail.nix +++ b/services/promtail.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: { +{ config, pkgs, hostname, ... }: { # Promtail Logging sops.secrets.promtail-pass = { @@ -37,7 +37,7 @@ max_age = "12h"; labels = { job = "systemd-journal"; - host = "nixos-p1"; + host = "${hostname}"; }; }; relabel_configs = [{