1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-09 18:26:54 +00:00
home-manager/modules/programs/pazi.nix

41 lines
885 B
Nix
Raw Normal View History

2019-11-03 16:20:00 -05:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.pazi;
2020-02-02 00:39:17 +01:00
in {
meta.maintainers = [ ];
2019-11-03 16:20:00 -05:00
options.programs.pazi = {
enable = mkEnableOption "pazi";
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
2019-11-03 16:20:00 -05:00
};
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
'';
};
}