From 0620f7abe1fb721d6ca4374ae3702f491a3f3d2e Mon Sep 17 00:00:00 2001 From: janabhumi Date: Mon, 5 Sep 2022 00:58:47 +0300 Subject: [PATCH] home/exa: add overlay without git extension --- home/progs/exa.nix | 16 ++++++++++++---- overlays/default.nix | 1 + overlays/exa.nix | 5 +++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 overlays/exa.nix diff --git a/home/progs/exa.nix b/home/progs/exa.nix index 1831337..ae647c8 100644 --- a/home/progs/exa.nix +++ b/home/progs/exa.nix @@ -4,7 +4,10 @@ with lib; let cfg = config.progs.exa; - bin = "${pkgs.exa}/bin/exa"; + + exaPackage = pkgs.exa-minimal; + defaultArgs = "--icons --classify"; + bin = "${exaPackage}/bin/exa ${defaultArgs}"; in { options.progs.exa = { @@ -16,9 +19,14 @@ in }; config = mkIf cfg.enable { - programs.exa = { - enable = true; - enableAliases = true; + home.packages = [ exaPackage ]; + + programs.zsh.shellAliases = mkIf config.shell.zsh.enable rec { + ls = "${bin} --oneline"; + la = "${ls} --all"; + lt = "${bin} --tree --level=3"; + ll = "${bin} --long --header"; + lla = "${ll} --all"; }; }; } diff --git a/overlays/default.nix b/overlays/default.nix index 62257f2..ad61820 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,5 @@ [ (import ./himalaya.nix) (import ./pass.nix) + (import ./exa.nix) ] diff --git a/overlays/exa.nix b/overlays/exa.nix new file mode 100644 index 0000000..366582c --- /dev/null +++ b/overlays/exa.nix @@ -0,0 +1,5 @@ +final: prev: { + exa-minimal = prev.exa.overrideAttrs (oldAttrs: { + cargoBuildFlags = [ "--no-default-features" ]; + }); +}