49 lines
913 B
Nix
49 lines
913 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkEnableOption mkOption mkIf;
|
|
inherit (lib.types) listOf package;
|
|
cfg = config.modules.system.roles.terminal;
|
|
in
|
|
{
|
|
options.modules.system.roles.terminal = {
|
|
enable = mkEnableOption "terminal packages" // {
|
|
default = true;
|
|
defaultText = ''
|
|
Enable by default, most systems will need a common set of CLI tools.
|
|
'';
|
|
};
|
|
extraPackages = mkOption {
|
|
type = listOf package;
|
|
default = [ ];
|
|
};
|
|
defaultPackages = mkOption {
|
|
type = listOf package;
|
|
default = with pkgs; [
|
|
btop
|
|
eza
|
|
bat
|
|
fish
|
|
cyme
|
|
lsof
|
|
git
|
|
delta
|
|
fzf
|
|
zip
|
|
unzip
|
|
fd
|
|
ripgrep
|
|
jnv
|
|
jq
|
|
];
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = cfg.extraPackages ++ cfg.defaultPackages;
|
|
};
|
|
}
|