dots/users/sam/home.nix
Price Hiller 5d30c3ba23
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m17s
refactor(nix/hm/sam): add more xdg.systemDirs.data dirs
2024-05-10 02:44:06 -05:00

36 lines
702 B
Nix

{
pkgs,
lib,
config,
...
}:
let
nixGLWrap =
pkg:
pkgs.runCommand "${pkg.name}-nixgl-wrapper" { } ''
mkdir $out
ln -s ${pkg}/* $out
rm $out/bin
mkdir $out/bin
for bin in ${pkg}/bin/*; do
wrapped_bin=$out/bin/$(basename $bin)
echo "exec ${lib.getExe pkgs.nixgl.nixGLIntel} $bin \$@" > $wrapped_bin
chmod +x $wrapped_bin
done
'';
in
{
imports = [ ../price/home.nix ];
xdg.systemDirs.data = [
"${config.home.homeDirectory}/.nix-profile/share"
"/usr/share"
"/usr/local/share"
];
home = {
packages = with pkgs; [
(lib.hiPrio (nixGLWrap neovide))
(lib.hiPrio (nixGLWrap wezterm))
];
};
}