feat: add ghq configuration
This commit is contained in:
parent
2203b49339
commit
8877cdee96
3 changed files with 29 additions and 0 deletions
27
modules/home-manager/cli/ghq/default.nix
Normal file
27
modules/home-manager/cli/ghq/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.cli.ghq;
|
||||
in
|
||||
{
|
||||
options.modules.cli.ghq = {
|
||||
enable = mkEnableOption "enable ghq";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
ghq
|
||||
fzf
|
||||
];
|
||||
|
||||
programs.git.extraConfig = {
|
||||
ghq = {
|
||||
root = "~/code";
|
||||
};
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
# thanks jdauliac for the tip
|
||||
g = "cd $(${pkgs.ghq}/bin/ghq root)/$(${pkgs.ghq}/bin/ghq list | ${pkgs.fzf}/bin/fzf)";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
./application/foot
|
||||
./application/imv
|
||||
./application/zathura
|
||||
./cli/ghq/default.nix
|
||||
./cli/git
|
||||
./cli/neovim
|
||||
./cli/vifm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue