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/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'modules/shell/default.nix') diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 27a919a..c2eada9 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -8,17 +8,21 @@ options.shell = { default = lib.mkOption { + type = lib.types.enum [ + "bash" + "zsh" + ]; + description = "Default shell."; + }; + + command = lib.mkOption { type = lib.types.str; - description = "Path to the default shell program."; + description = "Command for the default shell."; }; + alias = lib.mkOption { type = lib.types.attrs; description = "Shell aliases."; }; }; - - config = { - shell.default = lib.mkDefault "${pkgs.bash}/bin/bash"; # Set bash as default shell - shell.bash.enable = lib.mkDefault true; # Enable bash by default - }; } -- cgit v1.2.3