combined shell with shell-tools
This commit is contained in:
@@ -1,13 +1,27 @@
|
|||||||
{ inputs, ... }:
|
# This module provides all the shell options
|
||||||
|
{ inputs, lib, ... }:
|
||||||
{
|
{
|
||||||
flake.homeModules.shell-tools = { pkgs, ... }: {
|
flake.homeModules.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.homeModules; [
|
imports = with inputs.self.homeModules; [
|
||||||
shell # Includes option to select between zsh and bash
|
bash
|
||||||
|
zsh
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
eza
|
eza
|
||||||
files
|
files
|
||||||
];
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
programs.bash.enable = lib.mkForce (config.shell.program == "bash");
|
||||||
|
programs.zsh.enable = lib.mkForce (config.shell.program == "zsh");
|
||||||
|
home.shell.enableShellIntegration = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
@@ -20,4 +34,5 @@
|
|||||||
xclip
|
xclip
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{ inputs, lib, ... }:
|
|
||||||
{
|
|
||||||
flake.homeModules.shell = { config, ... }:
|
|
||||||
{
|
|
||||||
options.shell.program = lib.mkOption {
|
|
||||||
type = lib.types.enum [ "bash" "zsh" ];
|
|
||||||
default = "zsh";
|
|
||||||
description = "Which interactive shell configuration to enable.";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = with inputs.self.homeModules; [ bash zsh ];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
programs.bash.enable = lib.mkForce (config.shell.program == "bash");
|
|
||||||
programs.zsh.enable = lib.mkForce (config.shell.program == "zsh");
|
|
||||||
home.shell.enableShellIntegration = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user