98 lines
1.7 KiB
Nix
98 lines
1.7 KiB
Nix
{ lib, pkgs, ... }:
|
|
|
|
/*
|
|
instead of rebooting, you can source /etc/set-environment
|
|
to get the $NIX_LD_LIBRARY_PATH into your environment
|
|
|
|
TODO:
|
|
this is what i currently do to use conda/pypi with nix-ld:
|
|
|
|
export LD_LIBRARY_PATH="$NIX_LD_LIBRARY_PATH:/run/opengl-driver/lib:/run/opengl-driver-32/lib"
|
|
|
|
can i somehow add /run/opengl-driver/lib:/run/opengl-driver-32/lib to $NIX_LD_LIBRARY_PATH? will it work?
|
|
*/
|
|
|
|
{
|
|
# Add ~/.local/bin/ to $PATH
|
|
environment.localBinInPath = true;
|
|
|
|
programs.nix-ld.enable = true;
|
|
|
|
# Add graphical drivers to nix-ld
|
|
environment.sessionVariables = {
|
|
NIX_LD_LIBRARY_PATH = lib.mkForce (lib.concatStringsSep ":" [
|
|
"/run/current-system/sw/share/nix-ld/lib"
|
|
"/run/opengl-driver/lib"
|
|
"/run/opengl-driver-32/lib"
|
|
]);
|
|
};
|
|
|
|
programs.nix-ld.libraries = with pkgs; [
|
|
acl
|
|
at-spi2-atk
|
|
at-spi2-core
|
|
bzip2
|
|
curl
|
|
dbus
|
|
expat
|
|
fontconfig
|
|
freetype
|
|
fuse3
|
|
icu
|
|
libnotify
|
|
libproxy
|
|
libsodium
|
|
libssh
|
|
libunwind
|
|
libusb1
|
|
libuuid
|
|
libxml2
|
|
nspr
|
|
nss
|
|
openssl
|
|
stdenv.cc.cc
|
|
systemd
|
|
zlib
|
|
zstd
|
|
]
|
|
# TODO: # ++ lib.optionals (config.hardware.graphics.enable) [
|
|
++ [
|
|
alsa-lib
|
|
atk
|
|
cairo
|
|
cups
|
|
gdk-pixbuf
|
|
glib
|
|
gtk3
|
|
libGL
|
|
libappindicator-gtk3
|
|
libdrm
|
|
libglvnd
|
|
libpulseaudio
|
|
libxkbcommon
|
|
mesa
|
|
pango
|
|
pipewire
|
|
vulkan-loader
|
|
libX11
|
|
libXScrnSaver
|
|
libXcomposite
|
|
libXcursor
|
|
libXdamage
|
|
libXext
|
|
libXfixes
|
|
libXi
|
|
libXrandr
|
|
libXrender
|
|
libXtst
|
|
libxcb
|
|
libxkbfile
|
|
libxshmfence
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
gcc
|
|
];
|
|
|
|
}
|