We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b938d0 + 10d4286 commit 5508874Copy full SHA for 5508874
share/modules/nixos-shell-config.nix
@@ -12,13 +12,12 @@ in {
12
13
# fish seems to do funky stuff: https://github.com/Mic92/nixos-shell/issues/42
14
shell = if shell' == "fish" then "bash" else shell';
15
- in
16
- lib.mkMerge [
17
# Enable the module of the user's shell for some sensible defaults.
18
- (lib.mkIf (options.programs ? ${shell}.enable && shell != "bash") {
+ maybeSetShell = lib.optional (options.programs ? ${shell}.enable && shell != "bash") {
19
programs.${shell}.enable = mkVMDefault true;
20
- })
21
-
+ };
+ in
+ lib.mkMerge (maybeSetShell ++ [
22
(lib.mkIf (pkgs ? ${shell}) {
23
users.extraUsers.root.shell = mkVMDefault pkgs.${shell};
24
})
@@ -127,5 +126,5 @@ in {
127
126
128
networking.firewall.enable = mkVMDefault false;
129
}
130
- ];
+ ]);
131
0 commit comments