From b12732fb6ca5b4a08046984b612f948a68db4a2a Mon Sep 17 00:00:00 2001 From: r-vdp Date: Thu, 30 Apr 2026 10:58:22 +0200 Subject: [PATCH] switch-to-configuration-ng: fix dropins_removed comments --- pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs b/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs index e125a67a29f7..63867a9b9322 100644 --- a/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs +++ b/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs @@ -1086,9 +1086,11 @@ fn collect_unit_changes( // When the unit is disabled, the override files will be a symlink to /dev/null instead. dropins_removed = - // True if either no existing files or no disabled files (unit existed) + // True iff at least one current drop-in is not /dev/null, + // i.e. the instance was NixOS-managed in the old generation. !current_dropins.all(is_unit_disabled) - // True if either no new files or all disabled new files (unit gone) + // True iff there are no new drop-ins, or all of them are + // /dev/null, i.e. the instance is gone in the new generation. && new_dropins.all(is_unit_disabled); } }