Update to 24.11

This commit is contained in:
Jimbo 2024-11-19 13:20:34 -05:00
parent 79310cc53a
commit 81baaf8391
17 changed files with 94 additions and 80 deletions

View file

@ -9,6 +9,7 @@
];
files = [
"/etc/machine-id"
"/root/.gitconfig"
];
};
}

View file

@ -15,7 +15,7 @@
};
environment = {
systemPackages = with pkgs; [ unstable.impala ];
systemPackages = with pkgs; [ impala ];
persistence."/persist".directories = [ "/var/lib/iwd/" ];
};
};

View file

@ -1,10 +1,13 @@
{ config, pkgs, ... }:
{
imports = [ ./nvidia ];
imports = [
./nvidia
./nouveau
];
hardware.opengl = {
hardware.graphics = {
enable = config.system.desktop.enable;
driSupport32Bit = true;
enable32Bit = true;
extraPackages = with pkgs; [
vulkan-loader
vulkan-validation-layers

View file

@ -0,0 +1,15 @@
{ lib, pkgs, config, ... }:
{
options.system.video.nouveau = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the open-source Nouveau driver";
};
};
config = lib.mkIf config.system.video.nouveau.enable {
services.xserver.videoDrivers = [ "nouveau" ];
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
};
}

View file

@ -1,30 +1,14 @@
{ lib, pkgs, config, ... }:
{
options.system.video = {
nvidia = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the proprietary Nvidia stack";
};
};
nouveau = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the open-source Nouveau driver";
};
options.system.video.nvidia = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the proprietary Nvidia stack";
};
};
config = {
# Conditionally set video drivers based on the options
services.xserver.videoDrivers =
if config.system.video.nvidia.enable then [ "nvidia" ]
else if config.system.video.nouveau.enable then [ "nouveau" ]
else [];
# Configure Nvidia settings if Nvidia is enabled
config = lib.mkIf config.system.video.nvidia.enable {
hardware = {
nvidia = lib.mkIf config.system.video.nvidia.enable {
modesetting.enable = true;
@ -32,7 +16,10 @@
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = false;
};
opengl.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
services.xserver.videoDrivers = [ "nvidia" ];
};
}