Files
dendritic/modules/features/shell-tools.nix
T
2026-04-19 14:02:35 -05:00

59 lines
1.4 KiB
Nix

# This module provides all the shell options
{ inputs, lib, ... }:
{
flake.modules.homeManager.shell-tools = { config, pkgs, ... }: {
options.shell.program = lib.mkOption {
type = lib.types.enum [ "bash" "zsh" ];
default = "zsh";
description = "Which interactive shell configuration to enable.";
};
imports = with inputs.self.modules.homeManager; [
bash
zsh
files
];
config = {
home.shell.enableShellIntegration = true;
programs.zsh.enable = lib.mkForce (config.shell.program == "zsh");
home.packages = with pkgs; [
btop
uv
xclip
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.shell-tools
];
};
};
perSystem = { system, pkgs, self', ... }: {
packages.shell-tools = inputs.wrappers.lib.wrapPackage {
inherit pkgs;
binName = "wrapped-hello";
package = (pkgs.symlinkJoin {
name = "shell-tools";
paths = with pkgs; [
nh
ripgrep
fd
jq
wget
curl
dig
self'.packages.gdu
self'.packages.my-eza
hostname
iproute2
direnv
];
});
};
packages.gdu = inputs.wrappers.lib.wrapPackage {
inherit pkgs;
package = pkgs.gdu;
args = [ "-x" "--si" "--collapse-path" "--mouse" "$@" ];
};
};
}