mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
hstr: add module
This commit is contained in:
parent
3ace6a31dd
commit
99680311f1
5 changed files with 55 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -587,3 +587,5 @@ Makefile @thiagokokada
|
|||
/modules/xresources.nix @rycee
|
||||
|
||||
/modules/xsession.nix @rycee
|
||||
|
||||
/modules/programs/hstr.nix @Dines97
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
fingerprint = "4C92 E3B0 21B5 5562 A1E0 CE3D B1C0 12F0 E769 7195";
|
||||
}];
|
||||
};
|
||||
Dines97 = {
|
||||
name = "Denis Kaynar";
|
||||
email = "19364873+Dines97@users.noreply.github.com";
|
||||
github = "Dines97";
|
||||
githubId = 19364873;
|
||||
};
|
||||
dwagenk = {
|
||||
email = "dwagenk@mailbox.org";
|
||||
github = "dwagenk";
|
||||
|
|
|
@ -972,6 +972,13 @@ in
|
|||
A new module is available: 'services.syncthing'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-03-25T14:53:57+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.hstr'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ let
|
|||
./programs/hexchat.nix
|
||||
./programs/himalaya.nix
|
||||
./programs/home-manager.nix
|
||||
./programs/hstr.nix
|
||||
./programs/htop.nix
|
||||
./programs/hyfetch.nix
|
||||
./programs/i3status-rust.nix
|
||||
|
|
39
modules/programs/hstr.nix
Normal file
39
modules/programs/hstr.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.hstr;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ hm.maintainers.Dines97 ];
|
||||
|
||||
options.programs.hstr = {
|
||||
enable = mkEnableOption ''
|
||||
Bash And Zsh shell history suggest box - easily view, navigate, search and
|
||||
manage your command history'';
|
||||
|
||||
package = mkPackageOption pkgs "hstr" { };
|
||||
|
||||
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
eval "$(${cfg.package}/bin/hstr --show-configuration)"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/hstr --show-zsh-configuration)"
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue