diff options
author | mediocregopher <mediocregopher@gmail.com> | 2023-12-17 18:04:43 +0100 |
---|---|---|
committer | mediocregopher <mediocregopher@gmail.com> | 2023-12-17 18:50:38 +0100 |
commit | 22d28d232ce19a2001e9eca737e0eac788a20642 (patch) | |
tree | a069320df572dc958c1c2a7f05033570bc3ce3bc /alacritty | |
parent | 4a3f06b73c435486f77754a9ac0602bc72821b51 (diff) |
Figure out how to not use nixGL for alacritty
Diffstat (limited to 'alacritty')
-rw-r--r-- | alacritty/default.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/alacritty/default.nix b/alacritty/default.nix index 15fc3a4..d0c08aa 100644 --- a/alacritty/default.nix +++ b/alacritty/default.nix @@ -38,12 +38,22 @@ (builtins.readFile ./alacritty.yml) ); - alacritty = pkgs.writeScriptBin "alacritty" '' - #!${pkgs.bash}/bin/bash + shellEntrypoint = pkgs.writeShellScript "alacritty-shell-entrypoint" '' + unset LD_LIBRARY_PATH + unset __EGL_VENDOR_LIBRARY_DIRS + exec "${zsh}/bin/zsh" "$@" + ''; + + alacritty = pkgs.writeShellScriptBin "alacritty" '' + # TODO this might break things, especially if the machine is not using + # nvidia, but more investigation is needed. But it at least lets us get rid + # of nixGL. + export LD_LIBRARY_PATH=/usr/lib + export __EGL_VENDOR_LIBRARY_DIRS=/usr/share/glvnd/egl_vendor.d - exec ${pkgs.nixgl}/bin/nixGL ${pkgs.alacritty}/bin/alacritty \ + exec ${pkgs.alacritty}/bin/alacritty \ -o font.size=${builtins.toString config.alacritty.fontSize} \ --config-file ${configFile} \ - -e "${zsh}/bin/zsh" + -e "${shellEntrypoint}" ''; } |