From 42c7e632d7f878dda22aea96025d25ebdd41f140 Mon Sep 17 00:00:00 2001 From: mediocregopher Date: Sun, 17 Dec 2023 18:04:43 +0100 Subject: [PATCH] Figure out how to not use nixGL for alacritty --- alacritty/default.nix | 16 ++++++++++++++-- default.nix | 2 ++ x/default.nix | 1 - 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/alacritty/default.nix b/alacritty/default.nix index 15fc3a4..1296375 100644 --- a/alacritty/default.nix +++ b/alacritty/default.nix @@ -38,12 +38,24 @@ (builtins.readFile ./alacritty.yml) ); + shellEntrypoint = pkgs.writeShellScript "alacritty-shell-entrypoint" '' + unset LD_LIBRARY_PATH + unset __EGL_VENDOR_LIBRARY_DIRS + exec "${zsh}/bin/zsh" "$@" + ''; + alacritty = pkgs.writeScriptBin "alacritty" '' #!${pkgs.bash}/bin/bash - exec ${pkgs.nixgl}/bin/nixGL ${pkgs.alacritty}/bin/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.alacritty}/bin/alacritty \ -o font.size=${builtins.toString config.alacritty.fontSize} \ --config-file ${configFile} \ - -e "${zsh}/bin/zsh" + -e "${shellEntrypoint}" ''; } diff --git a/default.nix b/default.nix index e78f4c5..0955d2e 100644 --- a/default.nix +++ b/default.nix @@ -87,6 +87,8 @@ in rec { pkgs.tomb pkgs.udiskie + pkgs.xterm # nice to have a backup + ((import ./nvim) {}).nvim zsh ((import ./alacritty) { inherit config zsh; }).alacritty diff --git a/x/default.nix b/x/default.nix index b6d8f98..a060701 100644 --- a/x/default.nix +++ b/x/default.nix @@ -11,7 +11,6 @@ pkgs.xorg.xinit pkgs.xorg.xauth pkgs.xorg.xset - #pkgs.xorg.xf86inputevdev pkgs.xorg.xf86inputlibinput (pkgs.runCommand "xorg-conf-inner" {} ''