Setup Forgejo service + Migrate git configurations

This commit is contained in:
♥ Minnie ♥ 2024-06-03 21:05:04 +08:00
parent 115e2849cd
commit 9f8378df75
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
5 changed files with 40 additions and 5 deletions

View file

@ -7,13 +7,13 @@
programs.git = { programs.git = {
enable = true; enable = true;
userName = "sajenim"; userName = "jasmine";
userEmail = "its.jassy@pm.me"; userEmail = "its.jassy@pm.me";
extraConfig = { extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "master";
core.sshCommand = "ssh -i ~/.ssh/github_sk -F /dev/null"; core.sshCommand = "ssh -i ~/.ssh/forgejo_sk -F /dev/null";
gpg.format = "ssh"; commit.gpgsign = "true";
user.signingkey = "~/.ssh/signing_sk.pub"; user.signingkey = "8563E358D4E8040E";
}; };
}; };
} }

View file

@ -5,6 +5,7 @@
./traefik ./traefik
./minecraft ./minecraft
./borgbackup.nix ./borgbackup.nix
./forgejo.nix
./mpd.nix ./mpd.nix
]; ];
} }

View file

@ -0,0 +1,20 @@
{ ... }:
{
services.forgejo = {
enable = true;
stateDir = "/srv/services/forgejo";
settings = {
server = {
DOMAIN = "git.sajenim.dev";
ROOT_URL = "https://git.sajenim.dev";
HTTP_PORT = 3131;
LANDING_PAGE = "/jasmine";
};
service = {
DISABLE_REGISTRATION = true;
};
log.LEVEL = "Info";
};
};
}

View file

@ -2,6 +2,17 @@
{ {
services.traefik.dynamicConfigOptions.http.routers = { services.traefik.dynamicConfigOptions.http.routers = {
forgejo = {
rule = "Host(`git.sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "forgejo";
};
homarr = { homarr = {
rule = "Host(`kanto.dev`)"; rule = "Host(`kanto.dev`)";
entryPoints = [ entryPoints = [

View file

@ -2,6 +2,9 @@
{ {
services.traefik.dynamicConfigOptions.http.services = { services.traefik.dynamicConfigOptions.http.services = {
forgejo.loadBalancer.servers = [
{ url = "http://192.168.1.102:3131"; }
];
homarr.loadBalancer.servers = [ homarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7575"; } { url = "http://192.168.1.102:7575"; }
]; ];