updates; add forgejo
This commit is contained in:
parent
7d42965a0a
commit
e591a7a60c
3 changed files with 96 additions and 22 deletions
68
services.nix
68
services.nix
|
|
@ -1,10 +1,20 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in
|
||||
{
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "mail@kempinger.xyz"; # Replace with your email
|
||||
defaults.email = "mail@kempinger.xyz";
|
||||
certs."kempinger.at".domain = "*.kempinger.at";
|
||||
};
|
||||
|
||||
services.resolved.enable = true;
|
||||
|
|
@ -17,18 +27,64 @@
|
|||
virtualHosts."192.168.69.69" = {
|
||||
default = true;
|
||||
root = "/srv/website/public_html";
|
||||
locations."/" = { index = "index.html"; };
|
||||
locations."/" = {
|
||||
index = "index.html";
|
||||
};
|
||||
};
|
||||
# Optional: Add a domain-based virtual host
|
||||
virtualHosts."kempinger.at" = {
|
||||
root = "/srv/website/public_html";
|
||||
locations."/" = { index = "index.html"; };
|
||||
locations."/" = {
|
||||
index = "index.html";
|
||||
};
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
client_max_body_size 512M;
|
||||
'';
|
||||
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||
};
|
||||
};
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "postgres";
|
||||
# Enable support for Git Large File Storage
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.kempinger.at";
|
||||
# You need to specify this to remove the port from URLs in the web UI.
|
||||
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||
HTTP_PORT = 3000;
|
||||
};
|
||||
# You can temporarily allow registration to create an admin user.
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
# Add support for actions, based on act: https://github.com/nektos/act
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
# Sending emails is completely optional
|
||||
# You can send a test email from the web UI at:
|
||||
# Profile Picture > Site Administration > Configuration > Mailer Configuration
|
||||
# mailer = {
|
||||
# ENABLED = true;
|
||||
# SMTP_ADDR = "mail.kempinger.at";
|
||||
# FROM = "noreply@${srv.DOMAIN}";
|
||||
# USER = "noreply@${srv.DOMAIN}";
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
services.vscode-server.enable = true;
|
||||
# systemd.services.forgejo.preStart =
|
||||
# ''
|
||||
# ${lib.getExe cfg.package} admin user create --admin --email "root@localhost" --username crazychaoz --password temp123 || true
|
||||
# '';
|
||||
|
||||
#services.vscode-server.enable = true;
|
||||
|
||||
# Virtualisation
|
||||
virtualisation.docker = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue