Compare commits
No commits in common. "d7c499dde1e93d9f8fb944dfc71bc2f32931f035" and "aa96b9e6abed6191de0f2df029f237ca7239db82" have entirely different histories.
d7c499dde1
...
aa96b9e6ab
|
@ -180,7 +180,7 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-GgIXbuHvwReBHZUyfSKS6DET3CfD6EEKABj6ndpcqHQ=",
|
"narHash": "sha256-KP+2qdZlhmRkrafuuEofg7YnNdVmGV95ipvpuqmJneI=",
|
||||||
"path": "./../../out-of-tree/nixGL",
|
"path": "./../../out-of-tree/nixGL",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,10 +77,37 @@ let
|
||||||
fetchurl { inherit url sha256; };
|
fetchurl { inherit url sha256; };
|
||||||
useGLVND = true;
|
useGLVND = true;
|
||||||
});
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit nvidiaDrivers;
|
||||||
nvidiaLibsOnly = nvidiaDrivers.override {
|
nvidiaLibsOnly = nvidiaDrivers.override {
|
||||||
libsOnly = true;
|
libsOnly = true;
|
||||||
kernel = null;
|
kernel = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixGLNvidiaBumblebee = writeExecutable {
|
||||||
|
name = "nixGLNvidiaBumblebee-${version}";
|
||||||
|
text = ''
|
||||||
|
#!${runtimeShell}
|
||||||
|
export LD_LIBRARY_PATH=${
|
||||||
|
lib.makeLibraryPath [ nvidiaDrivers ]
|
||||||
|
}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||||
|
${
|
||||||
|
bumblebee.override {
|
||||||
|
nvidia_x11 = nvidiaDrivers;
|
||||||
|
nvidia_x11_i686 = nvidiaDrivers.lib32;
|
||||||
|
}
|
||||||
|
}/bin/optirun --ldpath ${
|
||||||
|
lib.makeLibraryPath ([ libglvnd nvidiaDrivers ]
|
||||||
|
++ lib.optionals enable32bits [
|
||||||
|
nvidiaDrivers.lib32
|
||||||
|
pkgsi686Linux.libglvnd
|
||||||
|
])
|
||||||
|
} "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: 32bit version? Not tested.
|
||||||
nixNvidiaWrapper = api:
|
nixNvidiaWrapper = api:
|
||||||
writeExecutable {
|
writeExecutable {
|
||||||
name = "nix${api}Nvidia-${version}";
|
name = "nix${api}Nvidia-${version}";
|
||||||
|
@ -115,34 +142,6 @@ let
|
||||||
exec "$@"
|
exec "$@"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
|
||||||
{
|
|
||||||
inherit nvidiaDrivers nvidiaLibsOnly;
|
|
||||||
|
|
||||||
nixGLNvidiaBumblebee = writeExecutable {
|
|
||||||
name = "nixGLNvidiaBumblebee-${version}";
|
|
||||||
text = ''
|
|
||||||
#!${runtimeShell}
|
|
||||||
export LD_LIBRARY_PATH=${
|
|
||||||
lib.makeLibraryPath [ nvidiaDrivers ]
|
|
||||||
}"''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
|
||||||
${
|
|
||||||
bumblebee.override {
|
|
||||||
nvidia_x11 = nvidiaDrivers;
|
|
||||||
nvidia_x11_i686 = nvidiaDrivers.lib32;
|
|
||||||
}
|
|
||||||
}/bin/optirun --ldpath ${
|
|
||||||
lib.makeLibraryPath ([ libglvnd nvidiaDrivers ]
|
|
||||||
++ lib.optionals enable32bits [
|
|
||||||
nvidiaDrivers.lib32
|
|
||||||
pkgsi686Linux.libglvnd
|
|
||||||
])
|
|
||||||
} "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: 32bit version? Not tested.
|
|
||||||
inherit nixNvidiaWrapper;
|
|
||||||
|
|
||||||
# TODO: 32bit version? Not tested.
|
# TODO: 32bit version? Not tested.
|
||||||
nixGLNvidia = nixNvidiaWrapper "GL";
|
nixGLNvidia = nixNvidiaWrapper "GL";
|
||||||
|
|
|
@ -8,17 +8,16 @@ echo "SCRIPT_DIR: ${SCRIPT_DIR}"
|
||||||
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
|
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
|
||||||
|
|
||||||
# Mason is bad: it puts binaries onto xdg.data
|
# Mason is bad: it puts binaries onto xdg.data
|
||||||
# let's make mason starts fresh, just in case we introduce RPATH hacks
|
|
||||||
# that injects binary for Mason to use.
|
|
||||||
rm -rf ~/.local/share/nvim/mason
|
rm -rf ~/.local/share/nvim/mason
|
||||||
|
|
||||||
# test if we have home-manager, if not, attempt to use nix to put home-manager to
|
# test if we have home-manager, if not, attempt to use nix to put home-manager to
|
||||||
# our environment
|
# our environment
|
||||||
if [ $(home-manager >/dev/null 2>&1) ]; then
|
if [ $(home-manager >/dev/null 2>&1) ]; then
|
||||||
# highly likely we don't even have nix support to start with, so let's fix that
|
# highly likely we don't even have nix support to start with, so let's fix that
|
||||||
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR $@"
|
sudo mv /etc/
|
||||||
|
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR"
|
||||||
else
|
else
|
||||||
home-manager switch -b backup --flake "$HOME_MANAGER_DIR" $@
|
home-manager switch -b backup --flake "$HOME_MANAGER_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue