Exclude packages in home manager

with

“wayland.windowManager.sway.enable = true”

I got some packages that I don’t really want (dmenu, swayidle). Is there any way to exclude them?

Interesting. And welcome!

I wasn’t aware that enabling sway would bring in swayidle or dmenu. Have you tried not enabling sway, and just installing the package? If that still brings in swayidle, perhaps it is the package itself (or, perhaps, another package you are installing) that has swayidle as a dependency.

Feel free to share your whole sway-related configs with us…

1 Like

Sounds like programs.sway.extraPackages.

1 Like

there is no such option in home manager

https://mipmip.github.io/home-manager-option-search/?query=programs.sway

my sway.nix

Have you tried not enabling sway, and just installing the package?

yeah this way it won’t install extra packages but I kinda need enabling sway.

Thank you! This does indeed look like programs.sway.extraPackages. Note the default value there. Is there a chance you have sway listed in your configuration.nix as well as your home-manager config?

I have wayland.windowManager.sway.enable = true in my config, and I definitely do not have dmenu, so I am trying to figure out what might be different in our configs. Without seeing the lists of packages installed in your configuration.nix or home-manager config, it is hard to tell. Feel free to share more…

omg you’re right I forgot to remove programs.sway.enable in configuration.nix

2 Likes

Excellent! So glad you figured it out.

1 Like