Files
nix-los/nixos/modules/shell.nix

27 lines
594 B
Nix
Raw Normal View History

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";
description = "Default shell (bash, zsh, fish)";
2026-04-07 02:34:03 +02:00
};
};
config = let
cfg = config.custom.shell;
in lib.mkIf cfg.enable {
programs.bash.enable = true;
2026-04-07 02:34:03 +02:00
programs.zsh.enable = cfg.defaultShell == "zsh";
programs.fish.enable = cfg.defaultShell == "fish";
# Common shell packages
environment.systemPackages = with pkgs; [
];
};
}