Nix : Make shell build link for gc root.

This commit is contained in:
Dmitry Voronin 2024-03-03 21:39:32 +03:00
parent 025f711262
commit 4ddcd4420c
2 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ environment, ... }: {
{ environment, pkgs, ... }: {
security.loginDefs.settings.UMASK = "077";
environment.variables = {
# Neovim.
@ -10,6 +10,9 @@
MANGOHUD_CONFIG = "no_display=0,hud_no_margin=1,font_size=12,toggle_hud=F1,fps_sampling_period=1000,fps_limit=165,fps_limit_method=early,af=16,vsync=3,gl_vsync=1,throttling_status=1,cpu_temp=1,gpu_temp=1,gpu_junction_temp=1,device_battery=gamepad,mouse,frame_timing=0,benchmark_percentiles=0,battery=1,battery_time=1,time=1,ram=1,vram=1,swap=1";
# Proton.
WINEFSYNC="1";
WINEFSYNC = "1";
# Nix.
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
};
}

View file

@ -33,8 +33,8 @@ function nix_shell() {
local target="${1}"
[[ "${target}" = "" ]] && target="default"
nix build ".#devShells.${target}" -o ".NixRoot"
NIX_SHELL="${target}" nix develop ".#devShells.${target}"
nix build ".#devShells.${NIX_CURRENT_SYSTEM}.${target}" -o ".NixRoot${target^}"
NIX_SHELL="${target}" nix develop ".#devShells.${NIX_CURRENT_SYSTEM}.${target}"
}
alias shell="nix_shell"