diff --git a/hosts/citadel/default.nix b/hosts/citadel/default.nix index b5bea31..b8f847b 100644 --- a/hosts/citadel/default.nix +++ b/hosts/citadel/default.nix @@ -53,6 +53,7 @@ in { ../common/optional/printing.nix ../common/optional/backlight.nix ../common/optional/xmodmap-arrow-remaps.nix + ../common/optional/nix-ld.nix ]; boot = { diff --git a/hosts/common/optional/nix-ld.nix b/hosts/common/optional/nix-ld.nix new file mode 100644 index 0000000..abf5250 --- /dev/null +++ b/hosts/common/optional/nix-ld.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: +{ + # Using non-Nix Python Packages with Binaries on NixOS https://github.com/mcdonc/.nixconfig/blob/e7885ad18b7980f221e59a21c91b8eb02795b541/videos/pydev/script.rst + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + zlib # numpy + libgcc # sqlalchemy + expat # pyosmium + # that's where the shared libs go, you can find which one you need using + # nix-locate --top-level libstdc++.so.6 (replace this with your lib) + # ^ this requires `nix-index` pkg + ]; + + environment.variables = { + NIX_LD_LIBRARY_PATH="/run/current-system/sw/share/nix-ld/lib"; + NIX_LD="/run/current-system/sw/share/nix-ld/lib/ld.so"; + LD_LIBRARY_PATH=lib.mkForce "$NIX_LD_LIBRARY_PATH"; + }; + +} + diff --git a/hosts/semita/default.nix b/hosts/semita/default.nix index a3175fc..4060ae4 100644 --- a/hosts/semita/default.nix +++ b/hosts/semita/default.nix @@ -57,6 +57,7 @@ in { ../common/optional/nixos-containers/jellyfin.nix ../common/optional/nixos-containers/baseddata-worker.nix ../common/optional/nixos-containers/mongodb.nix + ../common/optional/nix-ld.nix ]; fileSystems."/media/main-ssd" = { @@ -132,22 +133,5 @@ in { }; }; - # Using non-Nix Python Packages with Binaries on NixOS https://github.com/mcdonc/.nixconfig/blob/e7885ad18b7980f221e59a21c91b8eb02795b541/videos/pydev/script.rst - programs.nix-ld.enable = true; - programs.nix-ld.libraries = with pkgs; [ - zlib # numpy - libgcc # sqlalchemy - expat # pyosmium - # that's where the shared libs go, you can find which one you need using - # nix-locate --top-level libstdc++.so.6 (replace this with your lib) - # ^ this requires `nix-index` pkg - ]; - - environment.variables = { - NIX_LD_LIBRARY_PATH="/run/current-system/sw/share/nix-ld/lib"; - NIX_LD="/run/current-system/sw/share/nix-ld/lib/ld.so"; - LD_LIBRARY_PATH=lib.mkForce "$NIX_LD_LIBRARY_PATH"; - }; - services.libinput.enable = true; }