hyprpanel: nixify
This commit is contained in:
parent
d12a96ff76
commit
fe595e335d
3 changed files with 578 additions and 583 deletions
File diff suppressed because it is too large
Load diff
35
modules/nixos/system/hardware/gpu/amd/default.nix
Normal file
35
modules/nixos/system/hardware/gpu/amd/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.${namespace}.system.hardware.gpu.amd;
|
||||
|
||||
amdvlk-run = pkgs.writeShellScriptBin "amdvlk-run" ''
|
||||
export VK_DRIVER_FILES="${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.pkgsi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json"
|
||||
exec "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.${namespace}.system.hardware.gpu.amd = {
|
||||
enable = mkEnableOption "Enable AMD GPU";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = [ amdvlk-run ];
|
||||
variables = {
|
||||
AMD_VULKAN_ICD = "RADV";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue