2026-04-07 02:34:03 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
options.custom.shell = {
|
|
|
|
|
enable = lib.mkEnableOption "Shell configuration" // { default = true; };
|
|
|
|
|
defaultShell = lib.mkOption {
|
|
|
|
|
type = lib.types.str;
|
|
|
|
|
default = "zsh";
|
2026-04-07 04:46:00 +02:00
|
|
|
description = "Default shell (dash, zsh, fish)";
|
2026-04-07 02:34:03 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
config = let
|
|
|
|
|
cfg = config.custom.shell;
|
|
|
|
|
in lib.mkIf cfg.enable {
|
|
|
|
|
|
|
|
|
|
programs.zsh.enable = cfg.defaultShell == "zsh";
|
2026-04-07 04:46:00 +02:00
|
|
|
programs.dash.enable = true;
|
2026-04-07 02:34:03 +02:00
|
|
|
programs.fish.enable = cfg.defaultShell == "fish";
|
|
|
|
|
|
|
|
|
|
# Common shell packages
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
}
|