nixos/home/modules/lazygit.nix

31 lines
748 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 = [{
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";
};
};
};
};
}