diff --git a/home/aliases/default.nix b/home/aliases/default.nix new file mode 100644 index 0000000..259f148 --- /dev/null +++ b/home/aliases/default.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: +let + cfg = config.my.home.aliases; +in +{ + options.my.home.aliases = with lib; { + enable = my.mkDisableOption "shell aliases configuration"; + }; + + config = lib.mkIf cfg.enable { + home = { + shellAliases = { + # I like pretty colors + diff = "diff --color=auto"; + grep = "grep --color=auto"; + egrep = "egrep --color=auto"; + fgrep = "fgrep --color=auto"; + ls = "ls --color=auto"; + + # Well-known ls aliases + l = "ls -alh"; + ll = "ls -l"; + }; + }; + }; +} diff --git a/home/default.nix b/home/default.nix index c851f76..42d365b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./aliases ./atuin ./bat ./bluetooth diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 994a652..2e645c2 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -88,19 +88,6 @@ in AGKOZAK_LEFT_PROMPT_ONLY = 1; }; - shellAliases = { - # I like pretty colors - diff = "diff --color=auto"; - grep = "grep --color=auto"; - egrep = "egrep --color=auto"; - fgrep = "fgrep --color=auto"; - ls = "ls --color=auto"; - - # Well-known ls aliases - l = "ls -alh"; - ll = "ls -l"; - }; - # Enable VTE integration enableVteIntegration = true; };