nix-dotfiles/modules/software/system/fish.nix
2024-05-23 16:09:26 -07:00

32 lines
902 B
Nix

{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.modules.software.system.fish;
nix-colors-lib = inputs.nix-colors.lib.contrib { inherit pkgs; };
in {
options.modules.software.system.fish = {
enable = mkEnableOption "Enable fish, the friendly interpreted shell";
};
config = mkIf cfg.enable {
user.packages = with pkgs; [ bat fd fzf grc ];
environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish tide ];
users.defaultUserShell = pkgs.fish;
programs.fish.enable = true;
hm.programs.fish = let
colorScript = nix-colors-lib.shellThemeFromScheme { scheme = config.colorScheme; };
in {
enable = true;
plugins = [ { name = "grc"; src = pkgs.fishPlugins.grc.src; } ];
interactiveShellInit = ''
sh ${colorScript}
'';
functions.fish_greeting = ''
${lib.getExe pkgs.pfetch}
'';
};
};
}