From bdf5331c964e80204caaa7e54a60ef69748f33ed Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Sat, 28 Sep 2024 00:37:34 +0530 Subject: Added ability to change the default program if multiple programs for the same purpose are enabled. --- modules/shell/zsh/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/shell/zsh/default.nix') diff --git a/modules/shell/zsh/default.nix b/modules/shell/zsh/default.nix index 7d7a261..0c14b8c 100644 --- a/modules/shell/zsh/default.nix +++ b/modules/shell/zsh/default.nix @@ -6,7 +6,11 @@ }; config = lib.mkIf config.shell.zsh.enable { - shell.default = "${pkgs.zsh}/bin/zsh"; + shell.default = lib.mkDefault "zsh"; + shell.command = + if config.shell.default == "zsh" then + lib.mkForce "${pkgs.zsh}/bin/zsh" + else ""; programs.zsh.enable = true; programs.zsh.dotDir = ".config/zsh"; -- cgit v1.2.3