From 6182a5e659c24ce8f85c61a2203691d92563413e Mon Sep 17 00:00:00 2001 From: Thomas Miedema Date: Sat, 29 Mar 2025 20:13:21 +0100 Subject: [PATCH] nix-daemon: source nix-profile-daemon.sh only once Cherry-picked-from: https://github.com/NixOS/nix/pull/12805 Co-authored-by: Qyriad Fixes: #1134 Change-Id: I0c575f6b974e06b5064564bb084829fa6a6a6964 --- scripts/nix-profile-daemon.fish.in | 2 +- scripts/nix-profile-daemon.sh.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nix-profile-daemon.fish.in b/scripts/nix-profile-daemon.fish.in index c23aa64f0..5a8a5a565 100644 --- a/scripts/nix-profile-daemon.fish.in +++ b/scripts/nix-profile-daemon.fish.in @@ -15,7 +15,7 @@ if test -n "$__ETC_PROFILE_NIX_SOURCED" exit end -set __ETC_PROFILE_NIX_SOURCED 1 +set --export __ETC_PROFILE_NIX_SOURCED 1 set --export NIX_PROFILES "@localstatedir@/nix/profiles/default $HOME/.nix-profile" diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in index d256b24ed..bef1c10c2 100644 --- a/scripts/nix-profile-daemon.sh.in +++ b/scripts/nix-profile-daemon.sh.in @@ -1,6 +1,6 @@ # Only execute this file once per shell. if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi -__ETC_PROFILE_NIX_SOURCED=1 +export __ETC_PROFILE_NIX_SOURCED=1 NIX_LINK=$HOME/.nix-profile if [ -n "${XDG_STATE_HOME-}" ]; then