nixos/home/modules/lazygit.nix

33 lines
911 B
Nix
Raw Normal View History

2024-06-30 16:51:57 +00:00
{ lib, config, ... }:
let
cfg = config.snowhawk.lazygit;
in
{
options.snowhawk.lazygit = {
enable = lib.mkEnableOption "lazygit";
};
config = lib.mkIf cfg.enable {
programs.lazygit = {
enable = true;
settings = {
2024-06-30 23:56:16 +00:00
customCommands = [{
# We call this the double yoinky sploinky
# https://github.com/jesseduffield/lazygit/wiki/Custom-Commands-Compendium#pushing-a-specific-commit
2024-06-30 23:56:16 +00:00
key = "P";
context = "commits";
loadingText = "Pushing commit";
description = "Push a specific commit (and any preceding)";
stream = "yes";
command = "git push {{.SelectedRemote.Name}} {{.SelectedLocalCommit.Sha}}:{{.SelectedLocalBranch.Name}}";
}];
2024-06-30 16:51:57 +00:00
services = {
"git.zynh.me" = "gitea:git.zynh.me";
"git.nullcube.net" = "gitea:git.nullcube.net";
};
};
};
};
}