1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

exa: add module

Exa is a 'ls' alternative with more sane colorscheme than lsd on white
backgrounds.
This commit is contained in:
Christian Gram Kalhauge 2021-04-09 16:08:06 +02:00 committed by Robert Helgesson
parent 073710d7f2
commit 7cf69a3b8d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 55 additions and 0 deletions

2
.github/CODEOWNERS vendored
View file

@ -57,6 +57,8 @@
/modules/programs/emacs.nix @rycee
/modules/programs/exa.nix @kalhauge
/modules/programs/firefox.nix @rycee
/modules/programs/gh.nix @Gerschtli

View file

@ -31,6 +31,12 @@
github = "olmokramer";
githubId = 3612514;
};
kalhauge = {
name = "Christian Gram Kalhauge";
email = "kalhauge@users.noreply.github.com";
github = "kalhauge";
githubId = 1182166;
};
kubukoz = {
name = "Jakub Kozłowski";
email = "kubukoz@users.noreply.github.com";

View file

@ -1863,6 +1863,7 @@ in
lists to polybar-style 'foo-0, foo-1, ...' lists.
'';
}
{
time = "2021-02-25T22:36:43+00:00";
condition = config.programs.git.enable && any (msmtp: msmtp.enable)
@ -1873,6 +1874,7 @@ in
'accounts.email.accounts.<name>.msmtp.enable' is true.
'';
}
{
time = "2021-03-03T22:16:05+00:00";
message = ''
@ -1880,6 +1882,7 @@ in
https://no-color.org/.
'';
}
{
time = "2021-03-29T21:05:50+00:00";
message = ''
@ -1887,6 +1890,13 @@ in
applied after 'programs.dircolors.settings'.
'';
}
{
time = "2021-04-11T20:44:54+00:00";
message = ''
A new module is available: 'programs.exa'.
'';
}
];
};
}

View file

@ -63,6 +63,7 @@ let
(loadModule ./programs/direnv.nix { })
(loadModule ./programs/eclipse.nix { })
(loadModule ./programs/emacs.nix { })
(loadModule ./programs/exa.nix { })
(loadModule ./programs/feh.nix { })
(loadModule ./programs/firefox.nix { })
(loadModule ./programs/fish.nix { })

36
modules/programs/exa.nix Normal file
View file

@ -0,0 +1,36 @@
{ 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 = [ 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;
};
}