service: gitea&nginx
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
secrets,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
@@ -23,6 +28,17 @@
|
||||
type = "sqlite3";
|
||||
};
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
ROOT_URL = "https://git.colorsky.fun:8443";
|
||||
DOMAIN = "git.colorsky.fun";
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
PROTOCOL = "smtp+starttls";
|
||||
}
|
||||
// secrets.strings.gitea.mailer;
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.git = { };
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
{ ... }:
|
||||
{ secrets, ... }:
|
||||
|
||||
{ }
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."git.colorsky.fun" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "colorsky.fun";
|
||||
locations."/".proxyPass = "http://localhost:3000";
|
||||
|
||||
extraConfig = ''
|
||||
listen [::]:8443 ssl;
|
||||
'';
|
||||
};
|
||||
virtualHosts."192.168.68.59" = { };
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "i@colorsky.fun";
|
||||
certs."colorsky.fun" = {
|
||||
domain = "*.colorsky.fun";
|
||||
dnsProvider = "cloudflare";
|
||||
dnsPropagationCheck = true;
|
||||
|
||||
group = "nginx";
|
||||
|
||||
environmentFile = secrets.files.cloudflare-api-key;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user