Cleanup and restructuring

This commit is contained in:
foglar 2024-12-02 15:49:46 +01:00
parent 4ddd425f92
commit adb1e41319
4 changed files with 17 additions and 8 deletions

View File

@ -36,6 +36,7 @@
simple-scan simple-scan
vesktop vesktop
evince evince
gnome-font-viewer
]); ]);
}; };
} }

View File

@ -11,12 +11,15 @@
imports = [ imports = [
./tools/oh-my-posh.nix ./tools/oh-my-posh.nix
./tools/shell.nix
]; ];
config = lib.mkIf config.terminal_tools.enable { config = lib.mkIf config.terminal_tools.enable {
shell.bash.enable = lib.mkDefault true; sh.bash = {
shell.bash.oh-my-posh.enable = lib.mkDefault true; enable = lib.mkDefault true;
oh-my-posh.enable = lib.mkDefault true;
};
programs = { programs = {
bat.enable = true; bat.enable = true;

View File

@ -5,10 +5,10 @@
... ...
}: { }: {
options = { options = {
shell.oh-my-posh.enable = lib.mkEnableOption "enable oh-my-posh"; sh.bash.oh-my-posh.enable = lib.mkEnableOption "enable oh-my-posh";
}; };
config = lib.mkIf config.shell.oh-my-posh.enable { config = lib.mkIf config.sh.bash.oh-my-posh.enable {
programs.oh-my-posh = { programs.oh-my-posh = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;

View File

@ -1,10 +1,15 @@
{lib, ...}: { {
lib,
config,
...
}: {
options = { options = {
shell.enable = sh.bash.enable =
lib.mkEnableOption "enables shell tools"; lib.mkEnableOption "enables shell tools";
}; };
config = lib.mkIf lib.config.shell.enable { config = lib.mkIf config.sh.bash.enable {
programs.bash = { programs.bash = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;