feat(git): configure URL rewrite rules and SSH host settings for self-hosted Gitea
- Add Git `url."ssh://git@gitea.roadtotech.me:2223/"` redirection rule in `modules/user/base.nix` to intercept HTTPS and git SSH clones. - Add an explicit `gitea.roadtotech.me` SSH host block mapping to port `2223` and user `git`. Rationale: Automatically transparently routes all Gitea repository operations over SSH on the designated custom container port.feat(git): configure URL rewrite rules and SSH host settings for self-hosted Gitea Rationale: Automatically transparently routes all Gitea repository operations over SSH on the designated custom container port.
This commit is contained in:
1 parent
d82dbff90c
commit
31464c604f
1 file changed
+12
@@ -44,6 +44,13 @@
|
||||
init.defaultBranch = "main";
|
||||
merge.conflictstyle = "zdiff3";
|
||||
pull.rebase = true;
|
||||
|
||||
url."ssh://git@gitea.roadtotech.me:2223/" = {
|
||||
insteadOf = [
|
||||
"https://gitea.roadtotech.me/"
|
||||
"git@gitea.roadtotech.me:"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -104,6 +111,11 @@
|
||||
HostName = "roadtotech.me";
|
||||
Port = 2222;
|
||||
};
|
||||
"gitea.roadtotech.me" = {
|
||||
HostName = "gitea.roadtotech.me";
|
||||
Port = 2223;
|
||||
User = "git";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user