mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-15 17:50:53 +00:00
4e92ec84f9
Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com> Co-authored-by: Matthieu Coudron <teto@users.noreply.github.com>
37 lines
845 B
Nix
37 lines
845 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.programs.exa;
|
|
|
|
aliases = {
|
|
ls = "${pkgs.exa}/bin/exa";
|
|
ll = "${pkgs.exa}/bin/exa -l";
|
|
la = "${pkgs.exa}/bin/exa -a";
|
|
lt = "${pkgs.exa}/bin/exa --tree";
|
|
lla = "${pkgs.exa}/bin/exa -la";
|
|
};
|
|
|
|
in {
|
|
meta.maintainers = [ hm.maintainers.kalhauge ];
|
|
|
|
options.programs.exa = {
|
|
enable =
|
|
mkEnableOption "exa, a modern replacement for <command>ls</command>";
|
|
enableAliases = mkEnableOption "recommended exa aliases";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.packages = [ pkgs.exa ];
|
|
|
|
programs.bash.shellAliases = mkIf cfg.enableAliases aliases;
|
|
|
|
programs.zsh.shellAliases = mkIf cfg.enableAliases aliases;
|
|
|
|
programs.fish.shellAliases = mkIf cfg.enableAliases aliases;
|
|
|
|
programs.ion.shellAliases = mkIf cfg.enableAliases aliases;
|
|
};
|
|
}
|