depot/third_party/home-manager/modules/programs/pazi.nix
Default email 72904c318c Project import generated by Copybara.
GitOrigin-RevId: 9bf1f40af124573a54fd208b1f539eb694ef31a6
2020-10-11 17:22:58 -07:00

55 lines
1.1 KiB
Nix

{ 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
'';
};
}