environment.systemPackages =
lib.mkForce (lib.subtractLists [ pkgs.gnome.gnome-tweaks ] config.environment.systemPackages);
environment.systemPackages = with pkgs; [
gnome-tweaks
];
Dear All,
Thanks in advance for help. I have had a lovely run with nixos and am using specialisations.
If in a specialisation I want to remove a package and add a few other ones in a specialisation, how do I go about it.
Many thanks,
Krishna
You can’t subtract entries from the list like that.
The best option is to simply not add it to the common packages in the first place, and only add it to the respective specialisation.
You can also lock some subset of packages behind an option, and set said option to false
when you don’t want those packages available.
I have used list subtraction to have a specialisation with intel only in a laptop with hybrid graphics and it works well using this line in the specialisation:
boot.initrd.kernelModules =
lib.mkForce (lib.subtractLists [ "nvidia" ] config.boot.initrd.kernelModules);
If list subtraction is bad, is there any other way of having an intel only specialisation?