mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
lsd: add module
This commit is contained in:
parent
24b5f62090
commit
95e36dfe74
3 changed files with 49 additions and 0 deletions
|
@ -1005,6 +1005,13 @@ in
|
|||
A new module is available: 'programs.bat'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2019-03-19T23:07:34+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.lsd'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ let
|
|||
(loadModule ./programs/jq.nix { })
|
||||
(loadModule ./programs/keychain.nix { })
|
||||
(loadModule ./programs/lesspipe.nix { })
|
||||
(loadModule ./programs/lsd.nix { })
|
||||
(loadModule ./programs/man.nix { })
|
||||
(loadModule ./programs/matplotlib.nix { })
|
||||
(loadModule ./programs/mbsync.nix { })
|
||||
|
|
41
modules/programs/lsd.nix
Normal file
41
modules/programs/lsd.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.lsd;
|
||||
|
||||
aliases = {
|
||||
ls = "${pkgs.lsd}/bin/lsd";
|
||||
ll = "ls -l";
|
||||
la = "ls -a";
|
||||
lt = "ls --tree";
|
||||
lla ="ls -la";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
meta.maintainers = [ maintainers.marsam ];
|
||||
|
||||
options.programs.lsd = {
|
||||
enable = mkEnableOption "lsd";
|
||||
|
||||
enableAliases = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable recommended lsd aliases.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.lsd ];
|
||||
|
||||
programs.bash.shellAliases = mkIf cfg.enableAliases aliases;
|
||||
|
||||
programs.zsh.shellAliases = mkIf cfg.enableAliases aliases;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue