From 40968edd0d623040aa114a2a3c023814c75379c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Tue, 1 Apr 2025 23:13:40 +0200 Subject: [PATCH] fix(zellij): set default shell For some reason it fails when trying to start bash. --- modules/hm/gui/default.nix | 12 +++++++++++- modules/nixos/default.nix | 5 ----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/hm/gui/default.nix b/modules/hm/gui/default.nix index d885697..bc12a65 100644 --- a/modules/hm/gui/default.nix +++ b/modules/hm/gui/default.nix @@ -125,7 +125,17 @@ in }; }; }; - zellij.enable = cfg.terminal == "alacritty"; # alacritty has no terminal multiplexer built-in + zellij = { + enable = cfg.terminal == "alacritty"; # alacritty has no terminal multiplexer built-in + # Set default shell + settings.default_shell = + if config.programs.fish.enable then + "fish" + else if config.programs.zsh.enable then + "zsh" + else + "bash"; + }; # PDF reader zathura.enable = true; # Auto start sway diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 875044b..da8f8b4 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -35,11 +35,6 @@ in ]; programs = { - # Launch fish if shell is interactive (from https://wiki.nixos.org/wiki/Fish) - bash.interactiveShellInit = # bash - '' - if [[ "$(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm)" != "fish" && -z "$BASH_EXECUTION_STRING" ]]; then shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""; exec ${pkgs.fish}/bin/fish "$LOGIN_OPTION"; fi - ''; # Default shell fish.enable = true; # Shell prompt -- 2.48.1