summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-07-09 10:16:57 +0200
committerDaiderd Jordan <daiderd@gmail.com>2017-07-09 10:16:57 +0200
commit88a11d28f1d7da749ad47e5abd09712de99f0b96 (patch)
tree7fe20383805f6d3de97f8b4524a4597dc6cdc4ef /modules/programs
parent71f25cba9d530e3e7f58bd4698b8595dc1373927 (diff)
bash: enable by default
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/bash.nix10
-rw-r--r--modules/programs/fish.nix4
-rw-r--r--modules/programs/zsh/default.nix4
3 files changed, 13 insertions, 5 deletions
diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix
index da79742..feb17ca 100644
--- a/modules/programs/bash.nix
+++ b/modules/programs/bash.nix
@@ -22,7 +22,7 @@ in
programs.bash.enable = mkOption {
type = types.bool;
- default = false;
+ default = true;
description = "Whether to configure bash as an interactive shell.";
};
@@ -59,6 +59,14 @@ in
# /etc/bashrc: DO NOT EDIT -- this file has been generated automatically.
# This file is read for interactive shells.
+ if [ -z "$PS1" ]; then return; fi
+
+ PS1='\h:\W \u\$ '
+ # 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.
if [ -n "$__ETC_BASHRC_SOURCED" -o -n "$NOSYSBASHRC" ]; then return; fi
__ETC_BASHRC_SOURCED=1
diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix
index 62cfd8b..2848d3f 100644
--- a/modules/programs/fish.nix
+++ b/modules/programs/fish.nix
@@ -115,8 +115,8 @@ in
environment.pathsToLink = [ "/share/fish" ];
- environment.loginShell = mkDefault "${shell}/bin/fish -l";
- environment.variables.SHELL = mkDefault "${shell}/bin/fish";
+ environment.loginShell = "${shell}/bin/fish -l";
+ environment.variables.SHELL = "${shell}/bin/fish";
environment.etc."fish/config.fish".text = ''
# /etc/fish/config.fish: DO NOT EDIT -- this file has been generated automatically.
diff --git a/modules/programs/zsh/default.nix b/modules/programs/zsh/default.nix
index 88b79b1..7e70c1b 100644
--- a/modules/programs/zsh/default.nix
+++ b/modules/programs/zsh/default.nix
@@ -118,8 +118,8 @@ in
environment.pathsToLink = [ "/share/zsh" ];
- environment.loginShell = mkDefault "${shell}/bin/zsh -l";
- environment.variables.SHELL = mkDefault "${shell}/bin/zsh";
+ environment.loginShell = "${shell}/bin/zsh -l";
+ environment.variables.SHELL = "${shell}/bin/zsh";
environment.etc."zshenv".text = ''
# /etc/zshenv: DO NOT EDIT -- this file has been generated automatically.