home/exa: add overlay without git extension

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-05 00:58:47 +03:00
parent 8f0e992e1a
commit 0620f7abe1
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
3 changed files with 18 additions and 4 deletions

View file

@ -4,7 +4,10 @@ with lib;
let let
cfg = config.progs.exa; cfg = config.progs.exa;
bin = "${pkgs.exa}/bin/exa";
exaPackage = pkgs.exa-minimal;
defaultArgs = "--icons --classify";
bin = "${exaPackage}/bin/exa ${defaultArgs}";
in in
{ {
options.progs.exa = { options.progs.exa = {
@ -16,9 +19,14 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.exa = { home.packages = [ exaPackage ];
enable = true;
enableAliases = true; 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";
}; };
}; };
} }

View file

@ -1,4 +1,5 @@
[ [
(import ./himalaya.nix) (import ./himalaya.nix)
(import ./pass.nix) (import ./pass.nix)
(import ./exa.nix)
] ]

5
overlays/exa.nix Normal file
View file

@ -0,0 +1,5 @@
final: prev: {
exa-minimal = prev.exa.overrideAttrs (oldAttrs: {
cargoBuildFlags = [ "--no-default-features" ];
});
}