diff options
| author | Mario Rodas <marsam@users.noreply.github.com> | 2018-10-16 19:37:12 -0500 |
|---|---|---|
| committer | Mario Rodas <marsam@users.noreply.github.com> | 2018-10-16 19:54:07 -0500 |
| commit | 1a786eb08879d66ac67c3c584f05f3d9c2567c2b (patch) | |
| tree | b675c5c1c5582356501a43d721ba0d54e7e68880 /modules/programs/bash/default.nix | |
| parent | dff88ee954049f174e78f062c55a7a2a98d4db19 (diff) | |
bash: place bashrc early non-interactive return below system setup
Setting PATH and environment setup is required in non-interactive shells
Diffstat (limited to 'modules/programs/bash/default.nix')
| -rw-r--r-- | modules/programs/bash/default.nix | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/programs/bash/default.nix b/modules/programs/bash/default.nix index 1dd818d..ea5afe2 100644 --- a/modules/programs/bash/default.nix +++ b/modules/programs/bash/default.nix @@ -52,12 +52,6 @@ in # /etc/bashrc: DO NOT EDIT -- this file has been generated automatically. # This file is read for interactive shells. - # If not running interactively, don't do anything - [[ $- != *i* ]] && return - - # Make bash check its window size after a process completes - shopt -s checkwinsize - [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM" # Only execute this file once per shell. @@ -69,6 +63,13 @@ in export PATH=${config.environment.systemPath} ${config.system.build.setEnvironment.text} + + # Return early if not running interactively, but after basic nix setup. + [[ $- != *i* ]] && return + + # Make bash check its window size after a process completes + shopt -s checkwinsize + ${config.system.build.setAliases.text} ${config.environment.interactiveShellInit} |
