Add forge server, clean up common nginx configuration, and update for
latest nixos configuration expectations
This commit is contained in:
parent
c5de48b167
commit
8b74198e4d
8 changed files with 99 additions and 33 deletions
29
nix/home/programs/forgejo/backendserver.nix
Normal file
29
nix/home/programs/forgejo/backendserver.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{lib, ...}:
|
||||
|
||||
let
|
||||
domain = lib.strings.fileContents ../../../../secrets/letsencrypt/mediaserver/forgedomain;
|
||||
port = 9090;
|
||||
in
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ port ];
|
||||
allowedUDPPorts = [ port ];
|
||||
};
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
# database.type = "postgres";
|
||||
# Enable support for Git Large File Storage
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = domain;
|
||||
# You need to specify this to remove the port from URLs in the web UI.
|
||||
ROOT_URL = "https://${domain}/";
|
||||
HTTP_PORT = port;
|
||||
};
|
||||
# You can temporarily allow registration to create an admin user.
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue