update xorg.conf generation to align with upstream

This commit is contained in:
Gerg-L 2024-04-10 19:50:28 -04:00
parent 626fc59ac8
commit f6e1f52aeb
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI

View file

@ -5,7 +5,7 @@ _:
config, config,
... ...
}: }:
###TAKEN FROM HERE:https://github.com/NixOS/nixpkgs/blob/4787ebf7ae2ab071389be7ff86cf38edeee7e9f8/nixos/modules/services/x11/xserver.nix#L106-L136 ###TAKEN FROM HERE:https://github.com/NixOS/nixpkgs/blob/0e347b1a77a08ef429ea2bdf878eab6af99f90dc/nixos/modules/services/x11/xserver.nix#L106-L136
let let
xcfg = config.services.xserver; xcfg = config.services.xserver;
xserverbase = xserverbase =
@ -18,7 +18,7 @@ let
in in
'' ''
echo 'Section "Files"' >> $out echo 'Section "Files"' >> $out
echo ${fontpath} >> $out echo "${fontpath}" >> $out
for i in ${toString fontsForXServer}; do for i in ${toString fontsForXServer}; do
if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
for j in $(find $i -name fonts.dir); do for j in $(find $i -name fonts.dir); do
@ -26,11 +26,9 @@ let
done done
fi fi
done done
for i in $(find ${toString xcfg.modules} -type d); do ${lib.concatMapStrings (m: ''
if test $(echo $i/*.so* | wc -w) -ne 0; then echo " ModulePath \"${m}/lib/xorg/modules\"" >> "$out"
echo " ModulePath \"$i\"" >> $out '') xcfg.modules}
fi
done
echo '${xcfg.filesSection}' >> $out echo '${xcfg.filesSection}' >> $out
echo 'EndSection' >> $out echo 'EndSection' >> $out
echo >> $out echo >> $out