1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +01:00

gpu/amd: Remove loadInInitrd option

Option is now in nixpkgs under `hardware.amdgpu.initrd.enable` as of
NixOS/nixpkgs@6a0b6a6b74
This commit is contained in:
Lyndon Sanche 2024-06-26 16:51:35 -06:00 committed by mergify[bot]
parent 3980e7816c
commit 231274268f
5 changed files with 14 additions and 23 deletions

View file

@ -26,7 +26,7 @@ in {
hardware = { hardware = {
## Enable the Nvidia card, as well as Prime and Offload: ## Enable the Nvidia card, as well as Prime and Offload:
amdgpu.loadInInitrd = true; amdgpu.initrd.enable = lib.mkDefault true;
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;

View file

@ -1,24 +1,15 @@
{ config, lib, ... }: { lib, ... }:
{ {
options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
"loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)"
) // {
default = true;
};
imports = [ ../24.05-compat.nix ]; imports = [ ../24.05-compat.nix ];
config = lib.mkMerge [ config = {
{
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
hardware.graphics = { hardware.graphics = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true; enable32Bit = lib.mkDefault true;
}; };
}
(lib.mkIf config.hardware.amdgpu.loadInInitrd { hardware.amdgpu.initrd.enable = lib.mkDefault true;
boot.initrd.kernelModules = [ "amdgpu" ]; };
})
];
} }

View file

@ -20,7 +20,7 @@
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware = { hardware = {
amdgpu.loadInInitrd = lib.mkDefault false; amdgpu.initrd.enable = false;
nvidia = { nvidia = {
modesetting.enable = lib.mkDefault true; modesetting.enable = lib.mkDefault true;

View file

@ -22,7 +22,7 @@
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware = { hardware = {
amdgpu.loadInInitrd = lib.mkDefault false; amdgpu.initrd.enable = false;
nvidia = { nvidia = {
modesetting.enable = lib.mkDefault true; modesetting.enable = lib.mkDefault true;

View file

@ -18,7 +18,7 @@ in {
hardware = { hardware = {
## Enable the Nvidia card, as well as Prime and Offload: ## Enable the Nvidia card, as well as Prime and Offload:
amdgpu.loadInInitrd = true; amdgpu.initrd.enable = true;
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;