From a551cad606d7acf310a611ce14ca235a30382087 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 10 Feb 2025 23:38:47 +0100 Subject: Add fish plugins and move out shell configuration into module Signed-off-by: Mel --- modules/home/common.nix | 15 +++------------ modules/home/shell.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 modules/home/shell.nix (limited to 'modules') diff --git a/modules/home/common.nix b/modules/home/common.nix index 4454bfc..bf2d347 100644 --- a/modules/home/common.nix +++ b/modules/home/common.nix @@ -4,6 +4,7 @@ imports = [ ../foundation/home + ./shell.nix ./code.nix ]; @@ -18,21 +19,11 @@ }; ignores = [ # ignore most vim swap-files - "*~" "[._]*.sw?" + "*~" + "[._]*.sw?" ]; extraConfig.init.defaultBranch = "main"; }; - - fish = { - enable = true; - interactiveShellInit = '' - set fish_greeting - ''; - }; - - zoxide = { enable = true; enableFishIntegration = true; }; - starship = { enable = true; enableFishIntegration = true; }; - direnv = { enable = true; }; }; xdg.configFile = { diff --git a/modules/home/shell.nix b/modules/home/shell.nix new file mode 100644 index 0000000..5aa3a54 --- /dev/null +++ b/modules/home/shell.nix @@ -0,0 +1,34 @@ +{ pkgs, ... }: + +let + fishPlugin = p: { + inherit (p) src; + name = p.pname; + }; +in +{ + programs = { + fish = { + enable = true; + interactiveShellInit = '' + set fish_greeting + ''; + plugins = with pkgs.fishPlugins; [ + (fishPlugin sponge) + (fishPlugin colored-man-pages) + ]; + }; + + zoxide = { + enable = true; + enableFishIntegration = true; + }; + starship = { + enable = true; + enableFishIntegration = true; + }; + direnv = { + enable = true; + }; + }; +} -- cgit 1.4.1