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

27 lines
594 B
Nix

{ 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 (dash, zsh, fish)";
};
};
config = let
cfg = config.custom.shell;
in lib.mkIf cfg.enable {
programs.zsh.enable = cfg.defaultShell == "zsh";
programs.dash.enable = true;
programs.fish.enable = cfg.defaultShell == "fish";
# Common shell packages
environment.systemPackages = with pkgs; [
];
};
}