From 5bd3386dfa3bf2f30c21e144ece34bd176f31bae Mon Sep 17 00:00:00 2001 From: Malte Tammena Date: Sun, 17 Nov 2024 15:12:23 +0100 Subject: [PATCH] fix: simplify nixos label generation --- modules/base-system.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/base-system.nix b/modules/base-system.nix index 5a731d9..ec41e8b 100644 --- a/modules/base-system.nix +++ b/modules/base-system.nix @@ -58,13 +58,7 @@ in { # Use networkd for everything, I guess networking.useNetworkd = true; - system.nixos.label = let - rev = - if builtins.hasAttr "dirtyShortRev" inputs.self - then inputs.self.dirtyShortRev - else inputs.self.shortRev; - in - (builtins.concatStringsSep "-" (builtins.sort (x: y: x < y) config.system.nixos.tags)) + config.system.nixos.version + "-SHA:${rev}"; + system.nixos.label = (builtins.concatStringsSep "-" (builtins.sort (x: y: x < y) config.system.nixos.tags)) + config.system.nixos.version; # Use some binary caches nix.settings = {