Extract CLI

This commit is contained in:
James Patrick 2022-08-14 17:16:49 -04:00
parent e5723023ea
commit eeaaea35b9
2 changed files with 25 additions and 23 deletions

View File

@ -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
];
}

View File

@ -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;