forgejo: switched to new service available in 23.11
This commit is contained in:
parent
df0f6a4a41
commit
befaeac9ce
|
@ -24,8 +24,8 @@
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
forgejo = {
|
forgejo = {
|
||||||
file = ../../../secrets/forgejo.age;
|
file = ../../../secrets/forgejo.age;
|
||||||
owner = "gitea";
|
owner = "forgejo";
|
||||||
group = "gitea";
|
group = "forgejo";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
flake = builtins.getFlake (toString ../.);
|
flake = builtins.getFlake (toString ../.);
|
||||||
nixpkgsUnstable = flake.inputs.nixpkgsUnstable;
|
nixpkgsUnstable = flake.inputs.nixpkgsUnstable;
|
||||||
in {
|
in {
|
||||||
services.gitea = {
|
services.forgejo = {
|
||||||
enable = true; # Enable Forgejo
|
enable = true; # Enable Forgejo
|
||||||
appName = "Reciproka Kolectiva: Forgejo Service"; # Give the site a name
|
appName = "Reciproka Kolectiva: Forgejo Service"; # Give the site a name
|
||||||
database = {
|
database = {
|
||||||
|
@ -17,7 +17,6 @@ in {
|
||||||
};
|
};
|
||||||
domain = "reciproka.dev"; # Domain name
|
domain = "reciproka.dev"; # Domain name
|
||||||
httpPort = 3002; # Provided unique port
|
httpPort = 3002; # Provided unique port
|
||||||
package = pkgs.forgejo; # a soft fork of gitea
|
|
||||||
rootUrl = "https://reciproka.dev/"; # Root web URL
|
rootUrl = "https://reciproka.dev/"; # Root web URL
|
||||||
settings = let
|
settings = let
|
||||||
docutils = pkgs.python39.withPackages (ps:
|
docutils = pkgs.python39.withPackages (ps:
|
||||||
|
@ -50,17 +49,17 @@ in {
|
||||||
};
|
};
|
||||||
ui = {
|
ui = {
|
||||||
DEFAULT_THEME = "forgejo-auto"; # Set the default theme
|
DEFAULT_THEME = "forgejo-auto"; # Set the default theme
|
||||||
THEMES = "forgejo-auto,forgejo-light,forgejo-dark,auto,arc-green,gitea";
|
THEMES = "forgejo-auto,forgejo-light,forgejo-dark,auto,arc-green,forgejo";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
services = {
|
services = {
|
||||||
gitea = {
|
forgejo = {
|
||||||
# Ensure gitea starts after keys are loaded
|
# Ensure forgejo starts after keys are loaded
|
||||||
after = ["gitea-dbpass-key.service"];
|
after = ["forgejo-dbpass-key.service"];
|
||||||
wants = ["gitea-dbpass-key.service"];
|
wants = ["forgejo-dbpass-key.service"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -68,20 +67,20 @@ in {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true; # Ensure postgresql is enabled
|
enable = true; # Ensure postgresql is enabled
|
||||||
authentication = ''
|
authentication = ''
|
||||||
local gitea all ident map=gitea-users
|
local forgejo all ident map=forgejo-users
|
||||||
'';
|
'';
|
||||||
identMap =
|
identMap =
|
||||||
# Map the gitea user to postgresql
|
# Map the forgejo user to postgresql
|
||||||
''
|
''
|
||||||
gitea-users gitea gitea
|
forgejo-users forgejo forgejo
|
||||||
'';
|
'';
|
||||||
ensureDatabases = ["gitea"]; # Ensure the database persists
|
ensureDatabases = ["forgejo"]; # Ensure the database persists
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "gitea"; # Ensure the database user persists
|
name = "forgejo"; # Ensure the database user persists
|
||||||
ensurePermissions = {
|
ensurePermissions = {
|
||||||
# Ensure the database permissions persist
|
# Ensure the database permissions persist
|
||||||
"DATABASE gitea" = "ALL PRIVILEGES";
|
"DATABASE forgejo" = "ALL PRIVILEGES";
|
||||||
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
|
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -92,7 +91,7 @@ in {
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
compression = "zstd";
|
compression = "zstd";
|
||||||
databases = ["gitea"];
|
databases = ["forgejo"];
|
||||||
startAt = "*-*-* 15:00:00";
|
startAt = "*-*-* 15:00:00";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue