Skip to content

Commit 1134b9a

Browse files
committed
chore(packaging): Add VK_ICD path to session
1 parent ee8448b commit 1134b9a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

nix/hm.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@ self: {
22
config,
33
pkgs,
44
lib,
5+
system,
56
...
67
}: let
78
cfg = config.programs.oxirun;
89
defaultPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
910
oxirun-applications = self.packages.${pkgs.stdenv.hostPlatform.system}.oxirun-applications;
11+
driverIcdPath = "${pkgs.mesa}/share/vulkan/icd.d";
12+
icdArch =
13+
if system == "x86_64-linux"
14+
then "x86_64"
15+
else if system == "aarch64-linux"
16+
then "aarch64"
17+
else "x86_64";
1018
in {
1119
meta.maintainers = with lib.maintainers; [DashieTM];
1220
options.programs.oxirun = with lib; {
@@ -33,6 +41,10 @@ in {
3341
'';
3442
};
3543

44+
home.sessionVariables = {
45+
VK_ICD_FILENAMES = "${driverIcdPath}/radeon_icd.${icdArch}.json:${driverIcdPath}/intel_icd.${icdArch}.json";
46+
};
47+
3648
plugin_config = mkOption {
3749
type = with types; attrs;
3850
default = {};

0 commit comments

Comments
 (0)