Aliasing ksysguard

After an update from 21.04 to 21.11, I’m experiencing problem with my configuration.

$ nixos-rebuild build 
building Nix...
building the system configuration...
error: ksysguard has been replaced with plasma-systemmonitor

I’m adding plasma 5 packages in this manner.

  environment.systemPackages = with pkgs; [
    # packages omitted
  ] ++ builtins.filter lib.isDerivation (builtins.attrValues plasma5Packages.kdeGear)
    ++ builtins.filter lib.isDerivation (builtins.attrValues plasma5Packages.kdeFrameworks)
    ++ builtins.filter lib.isDerivation (builtins.attrValues plasma5Packages.plasma5);


The problem lies within plasma5Packages.plasma5, the error is thrown by lines introduced in part by plasma5Packages.ksysguard: remove if !allowAliases by alyssais · Pull Request #138395 · NixOS/nixpkgs · GitHub

And is connected with this issue, ksysguard throw message is not helpful · Issue #148452 · NixOS/nixpkgs · GitHub

I’m not sure how to proceed.

my configuration.nix does not have the part after the ]

++ builtins.filter lib.isDerivation (builtins.attrValues plasma5Packages.plasma5)

so remove that? (leave the ; after ])

plasma 5 is chosen in my config in the default way:

# Enable the Plasma 5 Desktop Environment.
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

updating from 21.05 to 21.11 was flawless!

and maybe after upgrading, put back your configuration?

Adding plasma5Packages.plasma5 provides packages required for full desktop experience.
What you propose is enabling only bare bone desktop manager, which I also have in my config.

To maybe paraphrase it. ksysguard is sneaking in plasma5Packages.plasma5. I don’t want to build this package list manually, I want to somehow filter ksysguard out.

I only proposed a workaround, you can go back to your preference after upgrading

I think I tried that, and it mostly broke my experience. Do you have most of packages listed here available with just services.xserver.desktopManager.plasma5.enable = true;?

maybe the config I proposed has to be done on the old 21.05 channel first

and then, when that is working, (after a nixos-rebuild switch or boot) upgrade to channel 21.11

and then go back to your wished config, on 21.11

that is the beauty of NixOS, you should not be too afraid of changing a few things in your config, you can always go back or further!

Good luck!

i hit the same issue. it’s currently necessary to set

nixpkgs.config.allowAliases = false;

This will break any aliases you’re using, so for example I had to change nix.package from nixFlakes to nixUnstable for my flakes-built system.