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
vesktop
evince
gnome-font-viewer
]);
};
}

View File

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

View File

@ -5,10 +5,10 @@
...
}: {
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 = {
enable = true;
enableBashIntegration = true;

View File

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