hyprpanel: nixify

This commit is contained in:
Christoph Hollizeck 2025-08-18 20:51:25 +02:00
parent d12a96ff76
commit fe595e335d
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
3 changed files with 578 additions and 583 deletions

File diff suppressed because it is too large Load diff

View 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";
};
};
};
}