From adb1e413198204439059a7afac52bcd812a08f1b Mon Sep 17 00:00:00 2001 From: foglar Date: Mon, 2 Dec 2024 15:49:46 +0100 Subject: [PATCH] Cleanup and restructuring --- nixos/packages/applications.nix | 1 + nixos/packages/terminal_tools.nix | 9 ++++++--- nixos/packages/tools/oh-my-posh.nix | 4 ++-- nixos/packages/tools/shell.nix | 11 ++++++++--- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/nixos/packages/applications.nix b/nixos/packages/applications.nix index ad37495..49b6f97 100644 --- a/nixos/packages/applications.nix +++ b/nixos/packages/applications.nix @@ -36,6 +36,7 @@ simple-scan vesktop evince + gnome-font-viewer ]); }; } diff --git a/nixos/packages/terminal_tools.nix b/nixos/packages/terminal_tools.nix index 3b447fd..136fa76 100644 --- a/nixos/packages/terminal_tools.nix +++ b/nixos/packages/terminal_tools.nix @@ -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; diff --git a/nixos/packages/tools/oh-my-posh.nix b/nixos/packages/tools/oh-my-posh.nix index 5196279..b86c306 100644 --- a/nixos/packages/tools/oh-my-posh.nix +++ b/nixos/packages/tools/oh-my-posh.nix @@ -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; diff --git a/nixos/packages/tools/shell.nix b/nixos/packages/tools/shell.nix index 59ea0d6..73aff15 100644 --- a/nixos/packages/tools/shell.nix +++ b/nixos/packages/tools/shell.nix @@ -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;