{ 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 = { 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}}"; }]; services = { "git.zynh.me" = "gitea:git.zynh.me"; "git.nullcube.net" = "gitea:git.nullcube.net"; }; }; }; }; }