feat(thor): add forgejo, code repo."
This commit is contained in:
parent
ee550f58b7
commit
850f15885a
5 changed files with 46 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./changedetection-io.nix
|
./changedetection-io.nix
|
||||||
|
./forgejo.nix
|
||||||
|
./secrets.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
34
modules/servers/thor/forgejo.nix
Normal file
34
modules/servers/thor/forgejo.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{config, ...}: {
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
session = {
|
||||||
|
COOKIE_SECURE = true;
|
||||||
|
};
|
||||||
|
server = {
|
||||||
|
ROOT_URL = "https://git.cronyakatsuki.xyz";
|
||||||
|
HTTP_ADDR = "127.0.0.1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
database = {
|
||||||
|
passwordFile = "${config.age.secrets.forgejo-db.path}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.traefik.dynamicConfigOptions.http = {
|
||||||
|
services.forgejo.loadBalancer.servers = [
|
||||||
|
{
|
||||||
|
url = "http://localhost:3000";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
routers.forgejo = {
|
||||||
|
rule = "Host(`git.cronyakatsuki.xyz`)";
|
||||||
|
tls = {
|
||||||
|
certResolver = "porkbun";
|
||||||
|
};
|
||||||
|
service = "forgejo";
|
||||||
|
entrypoints = "websecure";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
9
modules/servers/thor/secrets.nix
Normal file
9
modules/servers/thor/secrets.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
age = {
|
||||||
|
secrets = {
|
||||||
|
forgejo-db = {
|
||||||
|
file = ../../../secrets/forgejo-db.age;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
BIN
secrets/forgejo-db.age
Normal file
BIN
secrets/forgejo-db.age
Normal file
Binary file not shown.
|
@ -19,4 +19,5 @@ in {
|
||||||
"wg-desktop.age".publicKeys = systems ++ users;
|
"wg-desktop.age".publicKeys = systems ++ users;
|
||||||
"rclone.age".publicKeys = systems ++ users;
|
"rclone.age".publicKeys = systems ++ users;
|
||||||
"navidrome.age".publicKeys = systems ++ users;
|
"navidrome.age".publicKeys = systems ++ users;
|
||||||
|
"forgejo-db.age".publicKeys = systems ++ users;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue