Nixos upgrade failure

Since yesterday the nixos upgrade fails with

giu 09 03:00:32 nixos systemd[1]: Starting NixOS Upgrade...
giu 09 03:00:38 nixos nixos-upgrade-start[12844]: unpacking channels...
giu 09 03:01:13 nixos nixos-upgrade-start[12908]: these derivations will be built:
giu 09 03:01:13 nixos nixos-upgrade-start[12908]:   /nix/store/3xb2xhyyi69a6qnwj8y4ripm64xd75zx-nixos-rebuild.drv
giu 09 03:01:13 nixos nixos-upgrade-start[12908]: building '/nix/store/3xb2xhyyi69a6qnwj8y4ripm64xd75zx-nixos-rebuild.drv'...
giu 09 03:01:16 nixos nixos-upgrade-start[12841]: building Nix...
giu 09 03:01:18 nixos nixos-upgrade-start[12841]: building the system configuration...
giu 09 03:08:27 nixos nixos-upgrade-start[12972]: error: Pillow-7.1.2 not supported for interpreter python2.7

I have been able to restrict the failure to

 ~  nixos-option services.dbus.packages                                                                                                                                                   ✔ 
Value:
[
  «derivation /nix/store/653q48nb95mkvzglwfy7yd1q1pcp8mf1-sddm-0.18.1.drv»
  «derivation /nix/store/rgc3wg1wkfr0bv24zkc76ykc6n26n8wq-dbus-1.12.16.drv»
  «error: Pillow-7.1.2 not supported for interpreter python2.7»
  «derivation /nix/store/71yvrzpma4vc0rhan2yv3y41zarfavp9-cups-2.3.3.drv»
  «derivation /nix/store/saqs7iljf7b8ldxmr59d5f4pgzxrpxdi-cups-pk-helper-0.2.6.drv»
  «derivation /nix/store/lm3s4pxddwb4ppa19hzfb8kx3l0wj9qf-crda-3.18.drv»
  «derivation /nix/store/j5kl2znafd0l93l1l6vsq3jlfxfzgwpw-modem-manager-1.12.8.drv»
  «derivation /nix/store/2gfamrl90k5qc0lhqyfj8w9ppmprm4c9-network-manager-1.22.10.drv»
  «derivation /nix/store/r50ja44mbjd51hpqpwffnryhsnh56q5i-NetworkManager-fortisslvpn-gnome-1.2.10.drv»
  «derivation /nix/store/xqydav77w882vl61c067kg22bl54jici-NetworkManager-iodine-gnome-unstable-2019-11-05.drv»
  «derivation /nix/store/s3qjlq0qzk2wl5lk0ixsdcgvx1617i46-NetworkManager-l2tp-gnome-1.2.12.drv»
  «derivation /nix/store/52dhk2f5ada14g5pj9wh273zighm8bfg-NetworkManager-openconnect-gnome-1.2.6.drv»
  «derivation /nix/store/fp84vzaxp4yrn5sivhvhpcdwyvw70xjp-NetworkManager-openvpn-gnome-1.8.12.drv»
  «derivation /nix/store/b8mlfkah9w7cmxprfbz62f4sgiw8j20i-NetworkManager-vpnc-gnome-1.2.6.drv»
  «derivation /nix/store/mv1mfxv1cwfzmfzsrpdcyhwfz2bccby1-wpa_supplicant-2.9.drv»
  «derivation /nix/store/gd3av2a691hlaw8bh68fang7s4qf4sil-packagekit-1.1.13.drv»
  «derivation /nix/store/znkdimzriq037bhkic31nn9l0x92rnjz-upower-0.99.11.drv»
  «derivation /nix/store/kdz1vjbm5bayk5qvycaywvyddqk099a3-udisks-2.8.4.drv»
  «derivation /nix/store/hxyn8gbivyhjdvjdly1dibsvi11dmqjh-bluez-5.54.drv»
  «derivation /nix/store/27l55w3mrzxx76cpii3cpji2qcylmnhd-system-config-printer-1.5.12.drv»
  «derivation /nix/store/abh9k55cm8gz4p794i3q8wpkgxhvb4lj-flatpak-1.6.3.drv»
  «derivation /nix/store/y81hmpa235qzn3vyvd6xlnm1nr4838xk-rtkit-0.13.drv»
  «derivation /nix/store/rrpv5png84jkpfgkxh0nfrnlci9gqgxm-polkit-0.116.drv»
  «derivation /nix/store/zi6yzdci8hyhh1frf86np1wrf2nfc405-dconf-0.36.0.drv»
  «derivation /nix/store/la8rmv95v2j2z6bi74jy3l5myda8h0xl-autostart-ibus-daemon.drv»
  «derivation /nix/store/5fvrncrwyzif20ml2hfbm1v8fqgcvj6b-xdg-desktop-portal-1.6.0.drv»
  «derivation /nix/store/7dx6ksggsrhdifkbvz2i24kmlxpdlg8i-xdg-desktop-portal-kde-5.17.5.drv»
  «derivation /nix/store/7dx6ksggsrhdifkbvz2i24kmlxpdlg8i-xdg-desktop-portal-kde-5.17.5.drv»
  «derivation /nix/store/xph4v1rg5fiyx8n7yvwdn8rq46gs4qch-ibus-with-plugins-1.5.22.drv»
]

Default:
[ ]

Type:
"list of paths"

Description:
''
  Packages whose D-Bus configuration files should be included in
  the configuration of the D-Bus system-wide or session-wide
  message bus.  Specifically, files in the following directories
  will be included into their respective DBus configuration paths:
  <filename><replaceable>pkg</replaceable>/etc/dbus-1/system.d</filename>
  <filename><replaceable>pkg</replaceable>/share/dbus-1/system.d</filename>
  <filename><replaceable>pkg</replaceable>/share/dbus-1/system-services</filename>
  <filename><replaceable>pkg</replaceable>/etc/dbus-1/session.d</filename>
  <filename><replaceable>pkg</replaceable>/share/dbus-1/session.d</filename>
  <filename><replaceable>pkg</replaceable>/share/dbus-1/services</filename>
''

Declared by:
[ "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/system/dbus.nix" ]

Defined by:
[
  "/etc/nixos/dev/sddm.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/system/dbus.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/printing/cupsd.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/networking/networkmanager.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/misc/packagekit.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/hardware/upower.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/hardware/udisks2.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/hardware/bluetooth.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/desktops/system-config-printer.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/desktops/flatpak.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/security/rtkit.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/security/polkit.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/programs/dconf.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/i18n/input-method/ibus.nix"
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/config/xdg/portal.nix"
]

but I can’t analyse the failure any further.What can I do to debug this bould failure?

When I had it yesterday, I bisected my home-manager config…

Basically commenting everything and gradually adding back until it failed.

In my case it boiled down to nixops, which I then removed.

What was the command you used?

home-manager build, uncountable times, commenting out module by module, setting by setting.