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

pazi: add module

This commit is contained in:
Mario Rodas 2019-11-03 16:20:00 -05:00 committed by Robert Helgesson
parent 49852220f9
commit 05dabb7239
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 65 additions and 0 deletions

View file

@ -1207,6 +1207,13 @@ in
A new module is available: 'programs.rtorrent'.
'';
}
{
time = "2019-11-04T20:56:29+00:00";
message = ''
A new module is available: 'programs.pazi'.
'';
}
];
};
}

View file

@ -82,6 +82,7 @@ let
(loadModule ./programs/obs-studio.nix { })
(loadModule ./programs/offlineimap.nix { })
(loadModule ./programs/opam.nix { })
(loadModule ./programs/pazi.nix { })
(loadModule ./programs/pidgin.nix { })
(loadModule ./programs/rofi.nix { })
(loadModule ./programs/rtorrent.nix { })

57
modules/programs/pazi.nix Normal file
View file

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