summary refs log tree commit diff
path: root/nixos/modules/system/activation
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2021-12-05 18:47:35 +0100
committerJanne Heß <janne@hess.ooo>2021-12-05 18:47:35 +0100
commit5d34545954b260fe0d8dc744972dd42b4d0dcad2 (patch)
tree3cb38dc377904c973e5d9ce29821d6fe460c796e /nixos/modules/system/activation
parent1e422e7d58a7121c3752fcda2c00b09bf11edae9 (diff)
downloadnixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.tar
nixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.tar.gz
nixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.tar.bz2
nixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.tar.lz
nixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.tar.xz
nixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.tar.zst
nixpkgs-5d34545954b260fe0d8dc744972dd42b4d0dcad2.zip
nixos/switch-to-configuration: Ignore scopes
Diffstat (limited to 'nixos/modules/system/activation')
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 8a3b6a225c0..6ba72638b45 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -500,7 +500,9 @@ while (my ($unit, $state) = each %{$activeNew}) {
             push @failed, $unit;
         }
     }
-    elsif ($state->{state} ne "failed" && !defined $activePrev->{$unit}) {
+    # Ignore scopes since they are not managed by this script but rather
+    # created and managed by third-party services via the systemd dbus API.
+    elsif ($state->{state} ne "failed" && !defined $activePrev->{$unit} && $unit !~ /\.scope$/) {
         push @new, $unit;
     }
 }