feat(git): repo inits

This commit is contained in:
Barrett Ruth 2026-03-06 16:10:49 -05:00
parent 3f772138f2
commit fab931ad59
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
4 changed files with 42 additions and 2195 deletions

View file

@ -0,0 +1,34 @@
{
"name": "main",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": ["~DEFAULT_BRANCH"]
}
},
"rules": [
{ "type": "deletion" },
{ "type": "non_fast_forward" },
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": true,
"required_reviewers": [],
"require_code_owner_review": false,
"require_last_push_approval": true,
"required_review_thread_resolution": true,
"allowed_merge_methods": ["squash", "rebase"]
}
}
],
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
]
}

View file

@ -225,14 +225,7 @@ return {
}, },
}, },
platforms = { platforms = {
kattis = { default_language = 'cpp' },
codeforces = {
enabled_languages = { 'cpp', 'python' },
default_language = 'cpp',
},
atcoder = { atcoder = {
enabled_languages = { 'cpp', 'python' },
default_language = 'cpp',
overrides = { overrides = {
cpp = { cpp = {
template = '~/.config/nix/config/cp/template_single.cc', template = '~/.config/nix/config/cp/template_single.cc',
@ -246,8 +239,6 @@ return {
}, },
}, },
}, },
usaco = { default_language = 'cpp' },
codechef = { default_language = 'cpp' },
}, },
ui = { ui = {
picker = 'fzf-lua', picker = 'fzf-lua',

File diff suppressed because one or more lines are too long

View file

@ -122,13 +122,20 @@ in
}; };
}; };
xdg.configFile."github/ruleset.json".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/nix/config/github/ruleset.json";
programs.gh = { programs.gh = {
enable = true; enable = true;
settings = { settings = {
git_protocol = "https"; git_protocol = "https";
prompt = "enabled"; prompt = "enabled";
aliases = {
init = "!gh api --method PATCH /repos/\"$1\" -f delete_branch_on_merge=true -f allow_squash_merge=true -f allow_merge_commit=false -f allow_rebase_merge=true -f allow_auto_merge=true -f allow_update_branch=true -f squash_merge_commit_title=PR_TITLE -f squash_merge_commit_message=BLANK > /dev/null && gh api --method POST /repos/\"$1\"/rulesets --input ${config.xdg.configHome}/github/ruleset.json > /dev/null && echo \"done: $1\"";
}; };
}; };
};
programs.ssh = { programs.ssh = {
enable = true; enable = true;