Skip to content

Commit

Permalink
Configuration options for git-bubbles
Browse files Browse the repository at this point in the history
Fixes #45.
  • Loading branch information
ptitfred committed Oct 16, 2024
1 parent 56c5d31 commit 2d90181
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion home-manager-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,32 @@ let cfg = config.ptitfred.posix-toolbox;
in
{
options = {
ptitfred.posix-toolbox.enable = lib.mkEnableOption "posix-toolbox";
ptitfred.posix-toolbox = {
enable = lib.mkEnableOption "posix-toolbox";

git-bubbles.pattern = lib.mkOption {
name = "git-bubbles pattern";
type = lib.types.str;
default = null;
};

git-bubbles.remote-name = lib.mkOption {
name = "git-bubbles remote-name";
type = lib.types.str;
default = null;
};
};
};

config = {
home.packages = lib.mkIf cfg.enable packages;

programs.bash.initExtra =
lib.mkIf (cfg.enable && config.programs.bash.enable) initExtra;

programs.git.extraConfig = {
bubbles.remote-name = lib.mkIf cfg.enable cfg.git-bubbles.remote-name;
bubbles.pattern = lib.mkIf cfg.enable cfg.git-bubbles.pattern;
};
};
}

0 comments on commit 2d90181

Please sign in to comment.