diff --git a/modules/system/cli.nix b/modules/system/cli.nix index b2bfeb0..c01093f 100644 --- a/modules/system/cli.nix +++ b/modules/system/cli.nix @@ -1,17 +1,27 @@ -{ config, pkgs, ... }: { - programs.zsh = { - enable = true; - enableCompletion = true; +{ config, lib, pkgs, ... }: +let extras = config.my.system.cli.extras; +in with lib; { + options = { + my.system.cli.extras = { + enable = mkOption { + default = true; + type = with types; bool; + }; + pkgs = mkOption { + default = with pkgs; [ htop silver-searcher jq ripgrep tmux ]; + type = with types; listOf package; + }; + }; + }; + config = { + + programs.zsh = { + enable = true; + enableCompletion = true; + }; + + environment.systemPackages = with pkgs; + [ gnumake git vim killall unzip zsh ] + ++ optionals (extras.enable) extras.pkgs; }; - environment.systemPackages = with pkgs; [ - cmake - htop - jq - killall - ripgrep - silver-searcher - tmux - unzip - zsh - ]; } diff --git a/profiles/minimal.nix b/profiles/minimal.nix index 000ff83..cd29f50 100644 --- a/profiles/minimal.nix +++ b/profiles/minimal.nix @@ -2,14 +2,6 @@ let in { - - imports = [ - #../modules/. # This imports /modules/default.nix - #../modules/system/xdg.nix - ]; - # These are the most basic tools I need. - environment.systemPackages = with pkgs; [ nixfmt git gnumake vim zsh ]; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. programs.mtr.enable = true;