My NixOS and Home Manager configurations

use bash as surrogate for nushell

fixes random breakage that happens because of posix assumptions

quasigod.xyz 70aebd3d 9671f59b

verified
+15 -2
+15 -2
modules/programs/nushell.nix
··· 4 4 nixos = 5 5 { pkgs, hostConfig, ... }: 6 6 { 7 - environment.shells = [ pkgs.nushell ]; 8 - users.users.${hostConfig.primaryUser}.shell = pkgs.nushell; 7 + environment.systemPackages = [ pkgs.nushell ]; 8 + users.users.${hostConfig.primaryUser}.shell = pkgs.bash; 9 9 }; 10 10 home = 11 11 { pkgs, ... }: 12 12 { 13 + 13 14 programs = { 14 15 nushell = { 15 16 plugins = with pkgs.nushellPlugins; [ ··· 51 52 enable = true; 52 53 enableNushellIntegration = true; 53 54 }; 55 + bash.initExtra = '' 56 + # https://discourse.nixos.org/t/nushell-as-default-shell/68609/17 57 + # Some programs launch interactive shells and pretend 58 + # to use them; such programs always expect a form of POSIX 59 + # shell. 60 + # 61 + # If you don't use programs like that, you can just skip 62 + # this conditional. 63 + if ! [ "$TERM" = "dumb" ]; then 64 + exec nu 65 + fi 66 + ''; 54 67 }; 55 68 }; 56 69 };