fix: simplify nixos label generation

This commit is contained in:
Malte Tammena 2024-11-17 15:12:23 +01:00
parent 39ee2191a3
commit 5bd3386dfa

View file

@ -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 = {