r/NixOS • • 8d ago

Packages arent getting uninstalled even though i removed it in configuration.nix

For example, if i installed plasma-login-manager (services.displayManager.plasma-login-manager.enable) earlier but i want to remove PLM and use SDDM instead so i just remove PLM's configuration and add SDDM in and run nixos-rebuild switch, then reboot. But after a reboot, PLM still coexists with SDDM and still being set as default instead of SDDM. I'm new to Nix so i will be happy if someone can explain it and have a way to fix it :)

5 Upvotes

9 comments sorted by

11

u/DallasGriffin 8d ago

Insert 1 configuration.nix to continue playing.

Fr though, it'll be much easier to assist you if you provide us code/gh link

3

u/inteluser_ 8d ago

https://gofile.io/d/I0M1qzcL (I'm too lazy to upload it to a github link so here you go)

4

u/Quietus87 8d ago

What output does switch cough up?

1

u/inteluser_ 8d ago

building the system configuration...
Starting [systemd-run] /nix/store/pn56wfsrzncr0s7in0a68h550v8xp6mw-nixos-system-pine-26.11.20261121.2786a2a/bin/switch-to-configuration switch..
.
Started [systemd-run] /nix/store/pn56wfsrzncr0s7in0a68h550v8xp6mw-nixos-system-pine-26.11.20261121.2786a2a/bin/switch-to-configuration switch.
Checking switch inhibitors... done
updating GRUB 2 menu...
switching to system configuration /nix/store/pn56wfsrzncr0s7in0a68h550v8xp6mw-nixos-system-pine-26.11.20261121.2786a2a
stopping the following units: accounts-daemon.service, plasmalogin.service, polkit.service
activating the configuration...
removing group ‘plasmalogin’
removing user ‘plasmalogin’
setting up /etc...
removing obsolete symlink ‘/etc/plasmalogin.conf.d/99-user.conf’...
removing obsolete symlink ‘/etc/plasmalogin.conf.d/00-nixos-defaults.conf’...
removing obsolete symlink ‘/etc/pam.d/plasmalogin’...
removing obsolete symlink ‘/etc/pam.d/plasmalogin-greeter’...
removing obsolete symlink ‘/etc/pam.d/plasmalogin-autologin’...
removing obsolete symlink ‘/etc/tmpfiles.d/plasmalogin.conf’...
reloading user units for cgik...
reloading the following user units: dbus-broker.service
restarting the following user units: nixos-activation.service
restarting sysinit-reactivation.target
reloading the following units: dbus-broker.service
starting the following units: accounts-daemon.service, polkit.service
the following new units were started: display-manager.service, mandb.service, NetworkManager-dispatcher.service, plymouth-quit-wait.service, ply
mouth-quit.service, plymouth-read-write.service, run-user-175.mount, sysinit-reactivation.target, systemd-tmpfiles-resetup.service, user-175.sli
ce, user-runtime-dir@175.service, user@175.service
finished switching to system configuration /nix/store/pn56wfsrzncr0s7in0a68h550v8xp6mw-nixos-system-pine-26.11.20261121.2786a2a
nixos-rebuild-switch-to-configuration.service: Deactivated successfully.
nixos-rebuild-switch-to-configuration.service: Consumed 938ms CPU time over 4.208s wall clock time, 26.3M memory peak, 11.1M read from disk, 2.3
M written to disk.
Done. The new configuration is /nix/store/pn56wfsrzncr0s7in0a68h550v8xp6mw-nixos-system-pine-26.11.20261121.2786a2a

4

u/Quietus87 8d ago

So it builds. Two things I would do. Rebuild, do garbage collection, reboot, and make sure you choose the proper image when booting. If you still see it, check out what happens if you comment your aero theme out. Maybe it pulls in PLM as a dependency.

6

u/inteluser_ 8d ago

I managed to fix it! Turns out it was the grub on arch that i used alongside nix and it doesnt update the entries so i was booting the old configuration and not actually the newer ones... lol

3

u/duck1123 8d ago

These are annoying bugs to track because everything works just fine when you switch, breaks again on restart. I've been there.

0

u/Upstairs-Category571 8d ago

Happened to me on rEFInd too. I suggest using Lanzaboote/SystemD boot as ur bootloader, then make GRUB chainload it. Works well with rEFInd.

1

u/inteluser_ 8d ago

Yeah, i did chainloading the NixOS EFI from the Arch GRUB now