refactor(home:fish): split config
This commit is contained in:
parent
8f903a742a
commit
546ee5f965
5 changed files with 83 additions and 28 deletions
26
home/modules/console/shell/fish/aliases.nix
Normal file
26
home/modules/console/shell/fish/aliases.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue