aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/pazi.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/programs/pazi.nix')
-rw-r--r--home-manager/modules/programs/pazi.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/home-manager/modules/programs/pazi.nix b/home-manager/modules/programs/pazi.nix
new file mode 100644
index 00000000000..e1a08eb615a
--- /dev/null
+++ b/home-manager/modules/programs/pazi.nix
@@ -0,0 +1,55 @@
+{ 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
+ '';
+ };
+}