From 6178801ec3f0210aaae3fb8286970614f70fd705 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Wed, 9 Jul 2025 19:26:40 +0300 Subject: [PATCH] nushell: fix environment variables --- modules/common/nushell/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/common/nushell/default.nix b/modules/common/nushell/default.nix index d8206ea..9a4506f 100644 --- a/modules/common/nushell/default.nix +++ b/modules/common/nushell/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: let - inherit (lib) attrValues enabled filter first foldl' getExe last match mkIf nameValuePair optionalAttrs readFile removeAttrs splitString; + inherit (lib) attrValues const enabled getExe mapAttrs mkIf optionalAttrs readFile removeAttrs replaceString; in { environment = optionalAttrs config.isLinux { sessionVariables.SHELLS = getExe pkgs.nushell; @@ -131,7 +131,8 @@ in { # |> map (keyAndValue: nameValuePair (first keyAndValue) (last keyAndValue)) # |> foldl' (x: y: x // y) {}; homeVariablesExtra = {}; - in environmentVariables // homeVariables // homeVariablesExtra; + in environmentVariables // homeVariables // homeVariablesExtra + |> mapAttrs (const <| replaceString "$HOME" homeConfig.home.homeDirectory); shellAliases = removeAttrs config.environment.shellAliases [ "ls" "l" ] // { cdtmp = "cd (mktemp --directory)";