I am experiencing what I believe could be some trouble with NVIDIA and booting on NixOS 23.05. I am running open source NVIDIA drivers and have also tried their proprietary ones. I do also have home-manger and flakes enabled, but I don’t have anything running in either the home-manager standalone or in any flakes that should affect the booting process.
Problem:
When I boot up, I am greeted by systemd-boot, then Plymouth and my luks password prompt. That all seems to be working okay. I have sddm setup to autoLogin to my user and then load up Hyprland, which means I’m also using Wayland and Xwayland. Half of the time, everything seems to login just fine, but the other half of the time I see my system get hung up and I have to wait for some startup process to finish, and then I am able to login using TTY and reboot. This is obviously not ideal, so I would like to figure out what I may have broken.
What I expect:
I expect it to boot straight in to Hyprland after luks all of the time.
Here are some of the relevant parts of my config which might help figure out what’s going on. I’m fairly new to NixOS and especially with dealing with issues during boot, so I would really appreciate any pointers or help you may have. Thank you.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.systemd.enable = true;
boot.kernelParams = ["quiet" "nosgx"];
# for Plymouth
boot.plymouth = {
enable = true;
theme = "hexagon_red";
themePackages = [(pkgs.adi1090x-plymouth-themes.override {selected_themes = ["hexagon_red"];})];
};
# OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
# NVIDIA Settings
hardware.nvidia = {
modesetting.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# Enable NTFS support
boot.supportedFilesystems = [ "ntfs" ];
fileSystems."/mnt/extra" = {
device = "/dev/sda";
fsType = "ntfs-3g";
options = [ "rwx" "uid = 1000" ];
};
# Hyprland
programs.hyprland.enable = true;
programs.hyprland.xwayland.enable = true;
programs.hyprland.nvidiaPatches = true;
environment.sessionVariables.WLR_NO_HARDWARE_CURSORS = "1";
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
xdg-desktop-portal-hyprland
];
};
# X Server
services.xserver = {
enable = true;
layout = "us";
xkbVariant = "";
videoDrivers = [ "nvidia" ];
displayManager = {
sddm.enable = true;
autoLogin.enable = true;
autoLogin.user = "CipherJay";
gdm = {
enable = false;
wayland = false;
};
};
};
programs.xwayland.enable = true;