From 41023388be21892b4ef8d1b319d03e0e1e69a948 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 26 Feb 2024 00:57:15 +0300 Subject: [PATCH] Nix : Add NIXPKGS_ALLOW_UNFREE=1 env. --- .config/linux/system/module/common/Nix.nix | 5 +++-- .config/linux/system/module/common/bash/module/Nix.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.config/linux/system/module/common/Nix.nix b/.config/linux/system/module/common/Nix.nix index b509f07..543c8ee 100644 --- a/.config/linux/system/module/common/Nix.nix +++ b/.config/linux/system/module/common/Nix.nix @@ -1,4 +1,5 @@ -{ ... }: { - nixpkgs.config.allowUnfree = true; +{ environment, ... }: { + environment.variables.NIXPKGS_ALLOW_UNFREE = "1"; nix.settings.auto-optimise-store = true; + nixpkgs.config.allowUnfree = true; } diff --git a/.config/linux/system/module/common/bash/module/Nix.sh b/.config/linux/system/module/common/bash/module/Nix.sh index 8a8f863..7616fdd 100644 --- a/.config/linux/system/module/common/bash/module/Nix.sh +++ b/.config/linux/system/module/common/bash/module/Nix.sh @@ -60,7 +60,7 @@ function nix_tmpshell() { pkgs+=("nixpkgs#${pkg}") done - NIX_SHELL="${tag}" nix shell ${pkgs[@]} + NIX_SHELL="${tag}" NIXPKGS_ALLOW_UNFREE=1 nix shell --impure ${pkgs[@]} } alias tmpshell="nix_tmpshell"