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

View file

@ -5,6 +5,7 @@
./traefik
./minecraft
./borgbackup.nix
./forgejo.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 = {
forgejo = {
rule = "Host(`git.sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "forgejo";
};
homarr = {
rule = "Host(`kanto.dev`)";
entryPoints = [

View file

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