Compare commits

...

2 Commits

Author SHA1 Message Date
mediocregopher
42c7e632d7 Figure out how to not use nixGL for alacritty 2023-12-17 18:04:43 +01:00
mediocregopher
4a3f06b73c Add ability to include extra xorg conf from the config 2023-12-17 18:04:32 +01:00
4 changed files with 21 additions and 3 deletions

View File

@ -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}"
'';
}

View File

@ -26,4 +26,6 @@
};
binExtra = [];
xorgConfExtra = "";
}

View File

@ -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

View File

@ -11,7 +11,6 @@
pkgs.xorg.xinit
pkgs.xorg.xauth
pkgs.xorg.xset
#pkgs.xorg.xf86inputevdev
pkgs.xorg.xf86inputlibinput
(pkgs.runCommand "xorg-conf-inner" {} ''
@ -26,11 +25,14 @@
Section "Files"
ModulePath "${innerEnv}/lib/xorg/modules"
EndSection
${config.xorgConfExtra}
EOF
for f in $(ls ${innerEnv}/share/X11/xorg.conf.d | sort); do
cat ${innerEnv}/share/X11/xorg.conf.d/"$f" >> "$out"
done
'';
startx = pkgs.writeShellScriptBin "startx" ''