Booting to blinking cursor after nixos-rebuild --upgrade

I’m running NixOS with the Cosmic desktop environment, which I understand is experimental in nature. However this is (was) running on both my personal laptop and on my work desktop. I recently tried to adjust my configuration for my laptop because I realized that my GPU might not be configured correctly.

So I adjusted the config file in accordance with the NixOS wiki (adding hardware.graphics.enable = true; and hardware.graphics.enable32Bit=true; etc.) and ran `sudo nixos-rebuild boot --upgrade’

When I restarted my computer I arrived at a black screen with a blinking cursor in the corner. I’m able to boot into a TTY and edit things, but no amount of tinkering, going back, changing channels, has been able to unravel this issue.

Sorry if this is light on details, I can try to add a snippet of my config below:

{ config, pkgs, ... }:
let
     home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
in
{
     imports = 
          [ ./hardware-configuration.nix
          (import "${home-manager}/nixos")
          ];

      boot.loader.systemd-boot = {
          enable = true;
          consoleMode = "2";
      };
      boot.loader.efi.canTouchEfiVariables = true;

      # This was the original graphics line before I tried to adjust
      boot.initrd.kernelModules = ["amdgpu"];

       ### all the other setup ####

      services.displayManager.cosmic-greeter.enable = true;
      services.desktopManager.cosmic.enable = true;

      ### rest of the config + home manager ###

     services.asusd.enable = true;
     services.expressvpn.enable = true;
     services.seatd.enable = true;
     services.tailscale.enable = true;
     services.udisks2.enable = true;

     system.stateVersion = "25.11";
}

Thank you in advance and please let me know if other info is necessary

That config is definitely too little and almost certainly does not contain whatever is going wrong.

If you log into the tty, and use journalctl -e and journalctl --user -e, does that show you your error messages?

By the way, replace this:

With this:

let
     home-manager = builtins.fetchTarball {
       url = "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
       hash = "";
     };
in

And then update the hash with what nix spews at you. It will increase your build speeds by a few tens of seconds to minutes, and make your builds actually reproducible.

Thank you for taking the time to reply. So when I check journalctl -e it looks like there may be an error:

... .cosmic-comp-wrapped[2224]: Unable to become drm master, assuming unprivileged mode
.cosmic-comp-wrapped[2224]: thread 'main' panicked at 'Failed to load LibEGL: DlOpen { desc: "libEGL.so.1: cannot open shared object: No such file or directory" }': /build/cosmic...
.... # A bunch of error messages #
... greetd.service: Start request repeated too quickly
... greetd.service: Failed with result 'start-limit-hit'.
... systemd[1]: Failed to start greetd.service.

So it seems like there’s an issue with greetd starting.
I do have the services.seatd.enable = true;, but I don’t know if there’s another issue somewhere.

Cheers!

Looks more like your cosmic binary was built with libraries in weird places, but it’s hard to tell with all the context you elided. Might also be a misconfigured driver.

Do you have overlays, nix-ld, or are you running a cosmic binary you downloaded or suchlike?