Update a lot of options, simplify variables, replace options with tags
This commit is contained in:
parent
dbc0ab6dd3
commit
7667ef9a1b
147 changed files with 663 additions and 928 deletions
|
@ -3,7 +3,7 @@
|
|||
imports = [ ./nvidia ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = config.system.desktop.enable;
|
||||
enable = builtins.elem "pc" config.system.nixos.tags;
|
||||
enable32Bit = if config.nixpkgs.hostPlatform.linuxArch == "x86_64" then true else false;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.system.nvidia.enable = lib.mkEnableOption "Nvidia graphic drivers";
|
||||
config = lib.mkIf (lib.elem "nvidia" config.services.xserver.videoDrivers) {
|
||||
boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; # Framebuffer fixes TTY access
|
||||
|
||||
config = lib.mkIf config.system.nvidia.enable {
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
open = true;
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; # Framebuffer fixes TTY access
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
nixpkgs.allowUnfreePackages = [ "nvidia-x11" ];
|
||||
|
||||
specialisation.nouveau.configuration.config.system.nvidia.enable = lib.mkForce false;
|
||||
specialisation.nouveau.configuration.config.services.xserver.videoDrivers = lib.mkForce [ "nouveau" ];
|
||||
} // {
|
||||
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue