From 8ac3e32b8b5503ed6c16ac9e81f3016c723f0c21 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sun, 8 Sep 2024 00:31:15 +0200 Subject: [PATCH] fix(modules/hostname): hash the hostname to avoid duplicate services in the db Signed-off-by: Raito Bezarius --- modules/hostname.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hostname.nix b/modules/hostname.nix index d5cd962..5f18b04 100644 --- a/modules/hostname.nix +++ b/modules/hostname.nix @@ -15,7 +15,7 @@ in { }; config = { services.hostname = oneshot { - name = "hostname"; + name = "hostname-${builtins.substring 0 12 (builtins.hashString "sha256" config.hostname)}"; up = "echo ${config.hostname} > /proc/sys/kernel/hostname"; down = "true"; };