-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove when nixpkgs#318175 is merged and available in nixpkgs ++ Add AMDGPU NUR ++ remove hyprland pin
- Loading branch information
1 parent
2b329a7
commit 1e08aa7
Showing
6 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
let | ||
cfg = config.hardware.amdgpu.amdvlk; | ||
in { | ||
options.hardware.amdgpu.amdvlk = { | ||
enable = lib.mkEnableOption "AMDVLK Vulkan driver"; | ||
|
||
package = lib.mkPackageOption pkgs "amdvlk" { }; | ||
|
||
supportExperimental.enable = lib.mkEnableOption "Experimental features support"; | ||
|
||
support32Bit.enable = lib.mkEnableOption "32-bit driver support"; | ||
support32Bit.package = lib.mkPackageOption pkgs.driversi686Linux "amdvlk" { }; | ||
|
||
settings = lib.mkOption { | ||
type = lib.types.attrs; | ||
default = { }; | ||
example = { | ||
AllowVkPipelineCachingToDisk = 1; | ||
ShaderCacheMode = 1; | ||
IFH = 0; | ||
EnableVmAlwaysValid = 1; | ||
IdleAfterSubmitGpuMask = 1; | ||
}; | ||
description = '' | ||
Runtime settings for AMDVLK to be configured {file}`/etc/amd/amdVulkanSettings.cfg`. | ||
See [AMDVLK GitHub page](https://github.com/GPUOpen-Drivers/AMDVLK?tab=readme-ov-file#runtime-settings). | ||
''; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
hardware.opengl = lib.mkMerge [ | ||
{ | ||
enable = lib.mkDefault true; | ||
driSupport = lib.mkDefault true; | ||
extraPackages = [ cfg.package ]; | ||
} | ||
(lib.mkIf cfg.support32Bit.enable { | ||
driSupport32Bit = lib.mkDefault true; | ||
extraPackages32 = [ cfg.support32Bit.package ]; | ||
}) | ||
]; | ||
|
||
services.xserver.videoDrivers = [ "amdgpu" ]; | ||
|
||
environment.sessionVariables = lib.mkIf cfg.supportExperimental.enable { | ||
AMDVLK_ENABLE_DEVELOPING_EXT = "all"; | ||
}; | ||
|
||
environment.etc = lib.mkIf (cfg.settings != { }) { | ||
"amd/amdVulkanSettings.cfg".text = lib.concatStrings | ||
(lib.mapAttrsToList | ||
(n: v: '' | ||
${n},${builtins.toString v} | ||
'') | ||
cfg.settings); | ||
}; | ||
}; | ||
|
||
meta = { | ||
maintainers = with lib.maintainers; [ johnrtitor ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ libs, pkgs, inputs, ... }: | ||
{ | ||
imports = [ | ||
./amdvlk.nix | ||
]; | ||
|
||
nixpkgs.overlays = [ | ||
(final: prev: { | ||
bcachefs-tools = inputs.bcachefs-tools.packages.${pkgs.system}.bcachefs-tools; | ||
}) | ||
]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters