diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 33bbcade..75bc2666 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -4,6 +4,7 @@ ./programs/pipewire.nix ./programs/pop-launcher.nix ./programs/borgmatic.nix + ./programs/nushell.nix ./programs/python.nix ./services/archivebox.nix ./services/borgbackup.nix diff --git a/modules/home-manager/programs/nushell.nix b/modules/home-manager/programs/nushell.nix new file mode 100644 index 00000000..886d41cf --- /dev/null +++ b/modules/home-manager/programs/nushell.nix @@ -0,0 +1,15 @@ +# This is just an extended implementation of exporting Nushell session +# variables since the one from home-manager is only in POSIX sh script. +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.nushell; +in +{ + config.programs.nushell.extraEnv = let + exportSessionVariables = lib.mapAttrs (n: v: + "$env.${n} = ${v}") config.home.sessionVariables; + in lib.mkBefore '' + ${exportSessionVariables} + ''; +}