summary refs log tree commit diff
diff options
context:
space:
mode:
authorScott Bronson <brons_github@rinspin.com>2022-10-03 14:11:17 -0700
committerGitHub <noreply@github.com>2022-10-03 14:11:17 -0700
commit4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a (patch)
tree5038f703c0d0bfe23295356079e804dc30d65813
parent5622f584193827090a783b254433f82ede2f7739 (diff)
downloadnixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.tar
nixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.tar.gz
nixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.tar.bz2
nixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.tar.lz
nixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.tar.xz
nixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.tar.zst
nixpkgs-4db7061162a10c7b4ec7cbe4bf07234f3c68ce3a.zip
Sort the /etc/.clean file
Without sorting, the contents of /etc/.clean are likely to change on
every nixos-rebuild due to Perl's nondeterministic hash key ordering.
-rw-r--r--nixos/modules/system/etc/setup-etc.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/etc/setup-etc.pl b/nixos/modules/system/etc/setup-etc.pl
index be6b2d9ae71..a048261a3df 100644
--- a/nixos/modules/system/etc/setup-etc.pl
+++ b/nixos/modules/system/etc/setup-etc.pl
@@ -137,7 +137,7 @@ foreach my $fn (@oldCopied) {
 
 # Rewrite /etc/.clean.
 close CLEAN;
-write_file("/etc/.clean", map { "$_\n" } @copied);
+write_file("/etc/.clean", map { "$_\n" } sort @copied);
 
 # Create /etc/NIXOS tag if not exists.
 # When /etc is not on a persistent filesystem, it will be wiped after reboot,