Skip to content

Commit 189d4e3

Browse files
committed
Fix AMD GPU ROCm
1 parent 229b141 commit 189d4e3

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

nix/configuration.nix

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
mkFirejailWrapper = {
169169
pkgs,
170170
pkg,
171-
executable,
171+
exe,
172172
desktop ? null,
173173
profile ? null,
174174
extraArgs ? [],
@@ -194,15 +194,13 @@
194194
mkdir -p $out/share/applications
195195
cat <<'_EOF' >"$command_path"
196196
#! ${pkgs.runtimeShell} -e
197-
exec /run/wrappers/bin/firejail ${firejailArgs} -- ${
198-
toString executable
199-
} "$@"
197+
exec /run/wrappers/bin/firejail ${firejailArgs} -- ${toString exe} "$@"
200198
_EOF
201199
chmod 0755 "$command_path"
202200
''
203201
+ pkgs.lib.optionalString (desktop != null) ''
204202
substitute ${desktop} $out/share/applications/$(basename ${desktop}) \
205-
--replace ${executable} "$command_path"
203+
--replace ${exe} "$command_path"
206204
''
207205
);
208206
mkKbd = cfg: dev: {
@@ -437,6 +435,7 @@ in {
437435
TERMINAL = "alacritty";
438436
WLR_NO_HARDWARE_CURSORS = "1";
439437
NIXOS_OZONE_WL = "1";
438+
ROC_ENABLE_PRE_VEGA = "1";
440439
};
441440
environment.sessionVariables = environment.variables;
442441
#
@@ -467,11 +466,18 @@ in {
467466
#
468467
# GPU
469468
#
469+
systemd.tmpfiles.rules = [
470+
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages_5.clr}"
471+
];
470472
hardware.opengl = {
471473
enable = true;
472474
driSupport32Bit = true;
473475
extraPackages = with pkgs; [
474476
amdvlk
477+
rocmPackages_5.clr.icd
478+
rocmPackages_5.clr
479+
rocmPackages_5.rocminfo
480+
rocmPackages_5.rocm-runtime
475481
# vulkan-validation-layers
476482
# intel-media-driver # LIBVA_DRIVER_NAME=iHD
477483
# vaapiIntel # LIBVA_DRIVER_NAME=i965
@@ -964,16 +970,6 @@ in {
964970
simple-scan
965971
system-config-printer
966972
pulsemixer
967-
(mkFirejailWrapper {
968-
inherit pkgs;
969-
pkg = "firefox-firejail";
970-
executable = "${firefox-esr}/bin/firefox-esr";
971-
profile = mkFirejailProfile {
972-
pkg = "tabby";
973-
dir = "tabby";
974-
net = true;
975-
};
976-
})
977973
];
978974
programs.git = {
979975
enable = true;

0 commit comments

Comments
 (0)