feat(shell): add enable option

This commit is contained in:
2026-05-22 10:25:52 +02:00
parent c3239c544a
commit 1158e855c2
5 changed files with 34 additions and 17 deletions

View File

@@ -90,6 +90,7 @@
redis.enable = true; redis.enable = true;
}; };
k8s.enable = true; k8s.enable = true;
shell.enable = true;
my.stylix.enable = true; my.stylix.enable = true;
git.github.enable = true; git.github.enable = true;
git.gitlab.enable = true; git.gitlab.enable = true;

View File

@@ -4,13 +4,12 @@
dotsPath, dotsPath,
... ...
}: }:
let let
cfg = config.shell.bash; cfg = config.shell.bash;
inherit (config.home) username; inherit (config.home) username;
in in
{ {
imports = [ ./utils.nix ];
options.shell.bash = { options.shell.bash = {
aliases = { aliases = {
all = lib.mkOption { all = lib.mkOption {
@@ -34,7 +33,7 @@ in
}; };
}; };
config = { config = lib.mkIf config.shell.enable {
programs.bash = { programs.bash = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;

View File

@@ -1,4 +1,5 @@
{ {
config,
lib, lib,
... ...
}: }:
@@ -11,5 +12,9 @@
../tmux ../tmux
]; ];
tmux.enable = lib.mkDefault true; options.shell.enable = lib.mkEnableOption "shell";
config = lib.mkIf config.shell.enable {
tmux.enable = lib.mkDefault true;
};
} }

View File

@@ -1,3 +1,11 @@
{ {
programs.starship.enable = true; config,
lib,
...
}:
{
config = lib.mkIf config.shell.enable {
programs.starship.enable = true;
};
} }

View File

@@ -1,19 +1,23 @@
{ {
config,
lib, lib,
pkgs, pkgs,
... ...
}: }:
{
programs.fzf = {
enable = true;
enableBashIntegration = lib.mkDefault true;
};
home.packages = with pkgs; [ {
ripgrep config = lib.mkIf config.shell.enable {
bat programs.fzf = {
jq enable = true;
entr enableBashIntegration = lib.mkDefault true;
parallel };
];
home.packages = with pkgs; [
ripgrep
bat
jq
entr
parallel
];
};
} }