Nix : Enable LD.

This commit is contained in:
Dmitry Voronin 2024-01-25 17:21:51 +03:00
parent 27e6cabfee
commit d5d49fb9c7
3 changed files with 16 additions and 1 deletions

View file

@ -49,6 +49,10 @@ function nix_clean() {
[[ "${UID}" = 0 ]] && nix-store --gc
}
function nix_shell() {
nix-shell ~/.config/linux/Shell.nix
}
# Spawn temporary shell.
function shell() {
nix-shell -p "${@}"

8
.config/linux/Shell.nix Normal file
View file

@ -0,0 +1,8 @@
with import <nixpkgs> {};
mkShell {
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
stdenv.cc.cc
openssl
];
NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}

View file

@ -1,6 +1,6 @@
# Help: man configuration.nix or https://nixos.org/nixos/options.html
{ config, pkgs, ... }:
{ config, pkgs, stdenv, lib, ... }:
{
# System packages.
@ -43,6 +43,9 @@
# Network.
networking.networkmanager.enable = true;
# Ld.
programs.nix-ld.enable = true;
# Firewall.
networking.firewall.enable = false;