Failed to start display-manager service, unit display-manager.service is masked

Hello, last time I updated nixpkgs was a couple months ago, I’m using a flake-based config, so I updated my flake inputs (including nixpkgs) and rebuilt the config, but I’m facing a problem with lightdm, so everything used to work fine before updating, but for some reason lightdm doesn’t start it just throws me into a tty. I tried to manually systemctl restart display-manager.service but it says the service is masked, I tried to unmask it manually but that doesn’t work because it’s read-only. I’d appreciate any help regarding this problem.

Here is the relevant part of the config:

services.xserver = {
      enable = true;
      layout = "us";
      displayManager.lightdm.enable = true;
      displayManager.lightdm.extraConfig = "logind-check-graphical=true";
      displayManager.defaultSession = "none+bspwm";
      desktopManager.xterm.enable = false;
      windowManager.bspwm.enable = true;

And that’s the output of nix-info

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.49, NixOS, 23.11 (Tapir), 23.11.20230830.e7f38be`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos, unstable"`
 - channels(bwkam): `"home-manager, nixpkgs"`
 - nixpkgs: `/nix/store/19kjl5p3hx3l51yfnii653a3qzm4l6hf-source`


for some reason lightdm doesn’t start

It might be an idea to see why the systemd service didn’t start. Maybe there is some underlying issue. Did you investigate log files, journalctl?

You might start with something like journalctl -u display-manager.service and see what this gets you.

Can you launch an X11 session with bspwm without lightdm?

I checked but nothing useful, I updated nixpkgs again for good measures then rebuilt and lightdm works just fine now, I don’t know why

yes, that reminds me of when my lightdm on Arch Linux decided it had seen the best of its days and would no longer start on boot. That was fun. I ended up ditching Arch Linux.