feat: better quiet boot

This commit is contained in:
2024-04-03 01:21:31 +02:00
parent 8e826a066d
commit 427ced4085
6 changed files with 91 additions and 28 deletions

View File

@@ -0,0 +1,31 @@
{ pkgs, lib, config, ... }:
with lib;
let cfg = config.hardware.nvidia.preset.nouveau;
in {
options.hardware.nvidia.preset.nouveau = {
enable = mkEnableOption
"Enable the free Nouveau NVIDIA driver with some sane defaults";
};
config = mkIf cfg.enable {
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
boot = {
kernelParams = [ "nouveau.modeset=1" ];
kernelModules = [ "nouveau" ];
initrd.kernelModules = [ "nouveau" ];
};
environment.systemPackages = with pkgs; [
glxinfo
libva-utils
vulkan-tools
];
};
}