From 1d160e9cc18d722144f4e859ef77d71f5fdee578 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Fri, 31 May 2024 20:31:41 +0200 Subject: [PATCH] Remove the revCount attribute from the generated flake registry The revCount attribute is only present when the flake is an actual git repo and not when using a flake reference with an input scheme for a git forge that downloads tarballs instead (like github: or sourcehut:). Because of this, the hash of the nixos config changes depending on whether the config was built from a local git clone or from a flake ref using one of those input schemes. This leads to confusion (I lost quite some time figuring out what happened here) and unnecessary rebuilds. To my knowledge, there is no immediate benefit to including revCount in the flake registry entry. --- nixos/modules/config/nix-flakes.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/nix-flakes.nix b/nixos/modules/config/nix-flakes.nix index d6c31735a6ca..90e207fd4a61 100644 --- a/nixos/modules/config/nix-flakes.nix +++ b/nixos/modules/config/nix-flakes.nix @@ -72,7 +72,7 @@ in type = "path"; path = config.flake.outPath; } // filterAttrs - (n: _: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash") + (n: _: n == "lastModified" || n == "rev" || n == "narHash") config.flake )); };