refactor(home:fish): split config

This commit is contained in:
ooks-io 2024-07-15 12:37:19 +12:00
parent 8f903a742a
commit 546ee5f965
5 changed files with 83 additions and 28 deletions

View file

@ -0,0 +1,26 @@
{ lib, config, osConfig, pkgs, ... }:
let
inherit (lib) mkIf getExe;
inherit (pkgs) bat eza dust;
cfg = config.ooknet.shell.fish;
admin = osConfig.ooknet.host.admin;
in
{
config = mkIf (cfg.enable || admin.shell == "fish") {
programs.fish = {
shellAliases = {
cat = "${getExe bat}";
ls = "${getExe eza} -a --icons --group-directories-first";
lst = "${getExe eza} -T -L 5 --icons --group-directories-first";
du = "${getExe dust}";
};
shellAbbrs = {
f = "cd $FLAKE";
fe = "$EDITOR $FLAKE";
};
};
};
}