aboutsummaryrefslogtreecommitdiffstats
path: root/modules/file-management/eza/default.nix
blob: b4f2b3a9c154b62e368f1f2876f35c0dfd84f8f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Modern ls replacement with icons and colors
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.file-management.eza;
in
{
  options.file-management.eza = {
    enable = lib.mkEnableOption "Enables eza.";
    package = lib.mkOption {
      type = lib.types.package;
      readOnly = true;
      default = config.programs.eza.package;
      defaultText = lib.literalExpression "config.programs.eza.package";
      description = "The eza package to use.";
    };
  };

  config = lib.mkIf cfg.enable {
    programs.eza = {
      enable = true;
      icons = "always";
      colors = "always";
      git = config.development.git.enable;
      enableZshIntegration = config.terminal.zsh.enable;
      extraOptions = [
        "--all"
        "--git"
        "--group"
        "--group-directories-first"
        "--header"
        "--long"
      ];
    };
  };
}