diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2019-11-03 16:20:00 -0500 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2019-11-04 21:57:15 +0100 |
commit | 05dabb7239254c0d9b2f314d7aa73923917bd1cd (patch) | |
tree | 5af3c8c08c430d5668595fcd236913ab907a893e /modules/programs/pazi.nix | |
parent | 49852220f97ab4bf526bdbb11621dcc7251cc36d (diff) |
pazi: add module
Diffstat (limited to 'modules/programs/pazi.nix')
-rw-r--r-- | modules/programs/pazi.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/programs/pazi.nix b/modules/programs/pazi.nix new file mode 100644 index 00000000000..decc0d9dba6 --- /dev/null +++ b/modules/programs/pazi.nix @@ -0,0 +1,57 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.pazi; + +in + +{ + meta.maintainers = [ maintainers.marsam ]; + + options.programs.pazi = { + enable = mkEnableOption "pazi"; + + enableBashIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Bash integration. + ''; + }; + + enableZshIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Zsh integration. + ''; + }; + + enableFishIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Fish integration. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.pazi ]; + + programs.bash.initExtra = mkIf cfg.enableBashIntegration '' + eval "$(${pkgs.pazi}/bin/pazi init bash)" + ''; + + programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' + eval "$(${pkgs.pazi}/bin/pazi init zsh)" + ''; + + programs.fish.shellInit = mkIf cfg.enableFishIntegration '' + ${pkgs.pazi}/bin/pazi init fish | source + ''; + }; +} |