1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/modules/programs/lsd.nix

42 lines
762 B
Nix
Raw Normal View History

2019-03-17 22:37:21 +01:00
{ 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";
2020-02-02 00:39:17 +01:00
lla = "ls -la";
2019-03-17 22:37:21 +01:00
};
2020-02-02 00:39:17 +01:00
in {
2019-03-17 22:37:21 +01:00
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;
2020-01-06 07:09:51 +01:00
programs.fish.shellAliases = mkIf cfg.enableAliases aliases;
2019-03-17 22:37:21 +01:00
};
}