system/nix/progs/exa.nix

29 lines
507 B
Nix
Raw Normal View History

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.progs.exa;
bin = "${pkgs.exa}/bin/exa";
in
{
options.progs.exa = {
enable = mkOption {
type = types.bool;
default = false;
description = "Add and configure exa, a modern replacement for ls";
};
};
config = mkIf cfg.enable {
programs.exa.enable = true;
programs.zsh.shellAliases = mkIf config.shell.zsh.enable {
ls = "${bin} -1";
ll = "${bin} -l";
lt = "${bin} --tree";
};
};
}