feat: add ghq configuration
This commit is contained in:
parent
2203b49339
commit
8877cdee96
3 changed files with 29 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
};
|
};
|
||||||
cli = {
|
cli = {
|
||||||
|
ghq.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
vifm.enable = true;
|
vifm.enable = true;
|
||||||
|
|
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/foot
|
||||||
./application/imv
|
./application/imv
|
||||||
./application/zathura
|
./application/zathura
|
||||||
|
./cli/ghq/default.nix
|
||||||
./cli/git
|
./cli/git
|
||||||
./cli/neovim
|
./cli/neovim
|
||||||
./cli/vifm
|
./cli/vifm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue