From ef7d316578367ed7732a21eede6c79546a36124f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Tue, 28 Feb 2023 22:50:55 +0100 Subject: [PATCH] exa: always configure `exa` alias (#3721) Otherwise the `icons`, `git` and `extraOptions` options have no effect unless `enableAliases` is true. --- modules/programs/exa.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/programs/exa.nix b/modules/programs/exa.nix index 897020bbb..5f423ec7b 100644 --- a/modules/programs/exa.nix +++ b/modules/programs/exa.nix @@ -9,7 +9,7 @@ with lib; enable = mkEnableOption "exa, a modern replacement for ls"; - enableAliases = mkEnableOption "recommended exa aliases"; + enableAliases = mkEnableOption "recommended exa aliases (ls, ll…)"; extraOptions = mkOption { type = types.listOf types.str; @@ -49,6 +49,7 @@ with lib; # Use `command` instead of hardcoding the path to exa so that aliases don't # go stale after a system update. exa = "exa ${args}"; + } // optionalAttrs cfg.enableAliases { ls = "exa"; ll = "exa -l"; la = "exa -a"; @@ -58,12 +59,12 @@ with lib; in mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.shellAliases = mkIf cfg.enableAliases aliases; + programs.bash.shellAliases = aliases; - programs.zsh.shellAliases = mkIf cfg.enableAliases aliases; + programs.zsh.shellAliases = aliases; - programs.fish.shellAliases = mkIf cfg.enableAliases aliases; + programs.fish.shellAliases = aliases; - programs.ion.shellAliases = mkIf cfg.enableAliases aliases; + programs.ion.shellAliases = aliases; }; }