Debloating GNOME

Hello, peeps!

I had a laptop laying around and I thought I’d give NixOS a spin because it looks pretty interesting.
I am still trying to find my way around, though, so the first “issue” I’ve encountered is how to uninstall some packages that come preinstalled with GNOME. I have looked through the configuration.nix and tried to follow the instructions provided in this link but to no avail.

How can I uninstall packages (and how can I list installed packages)?

-Cheers! :smiley:

For listing installed packages using nixos-option command to get value of environment.systemPackages might be helpful.

As for removing, we have a PR that will document this behaviour but it has not been merged yet:

https://github.com/NixOS/nixpkgs/blob/e70e481a54f4327d32a3ecf8c61f6bc96d9d5ac5/nixos/modules/services/x11/desktop-managers/gnome3.xml#L56-L61

Though that is not completely up to date. evince, geary and some other modules can be excluded that way now.

4 Likes

Thanks for the reply. So, in other words, I would have to exclude the packages upon installing the system? E.g. if I want to uninstall cheese, I’d have to opt-environment.gnome3.excludePackages = [ pkgs.gnome3.cheese ];? Never mind; that didn’t work.

Does it mean that I need to disable all optional packages?

I would expect cheese to be disabled by that. Also you can disable whole groups of programs, see the module code:

1 Like

Perfect. Thanks a lot, Jan. I did manage to find a way around it, though: disabling the packages after install worked a charm :slight_smile: