nixos/switch-to-configuration: Ignore started scopes

They are not managed by us and it might be weird to users to see units
they didn't expect to be started.

Changed files
+3 -1
nixos
modules
system
+3 -1
nixos/modules/system/activation/switch-to-configuration.pl
···
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;
}
}