From 90dac235bb409e5795aa460b34388c455178035c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Apr 2014 18:57:04 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20the=20option=20=E2=80=98programs.bash.?= =?UTF-8?q?enable=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NixOS has a pervasive dependency on bash. For instance, the X11 session script sources /etc/profile to get a reasonable environment. Thus we should not provide an option to disable bash. Also, enabling zsh no longer sets ‘users.defaultUserShell’ to zsh, to prevent a collision with bash's definition of the same option. (Changing the default shell is also something that should be left to the user.) --- nixos/modules/programs/bash/bash.nix | 4 +++- nixos/modules/programs/zsh/zsh.nix | 2 +- nixos/modules/rename.nix | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index 9584f07b094..c5c0f9d0121 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -40,6 +40,7 @@ in programs.bash = { + /* enable = mkOption { default = true; description = '' @@ -52,6 +53,7 @@ in ''; type = types.bool; }; + */ shellAliases = mkOption { default = config.environment.shellAliases // { which = "type -P"; }; @@ -114,7 +116,7 @@ in }; - config = mkIf cfg.enable { + config = /* mkIf cfg.enable */ { programs.bash = { diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 7bcf8da2c65..a3efad288ac 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -168,7 +168,7 @@ in environment.systemPackages = [ pkgs.zsh ]; - users.defaultUserShell = mkDefault "/run/current-system/sw/bin/zsh"; + #users.defaultUserShell = mkDefault "/run/current-system/sw/bin/zsh"; environment.shells = [ "/run/current-system/sw/bin/zsh" diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 1a0c7c0168c..0ee2caa28ea 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -128,5 +128,6 @@ in zipModules ([] # Options that are obsolete and have no replacement. ++ obsolete' [ "boot" "loader" "grub" "bootDevice" ] ++ obsolete' [ "boot" "initrd" "luks" "enable" ] +++ obsolete' [ "programs" "bash" "enable" ] )