Compare commits

...

10 Commits

3 changed files with 30 additions and 15 deletions

View File

@ -161,6 +161,7 @@
security.acme = {
acceptTerms = true;
defaults.email = "acme.evict519@simplelogin.com";
certs."dylanblades.com".extraDomainNames = ["gitea.dylanblades.com"];
};
time.timeZone = "Europe/London";
@ -195,6 +196,7 @@
};
gitea = {
enable = true;
appName = "Gitea";
settings = {
server.DOMAIN = "gitea.dylanblades.com";
ui.DEFAULT_THEME = "gitea-dark";
@ -202,20 +204,27 @@
};
nginx = {
enable = true;
virtualHosts."gitea.dylanblades.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3000";
extraConfig = ''
client_max_body_size 512M;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
virtualHosts = {
"dylanblades.com" = {
forceSSL = true;
enableACME = true;
root = pkgs.my-site;
};
"gitea.dylanblades.com" = {
forceSSL = true;
useACMEHost = "dylanblades.com";
locations."/" = {
proxyPass = "http://localhost:3000";
extraConfig = ''
client_max_body_size 512M;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
};
};
};
@ -225,7 +234,10 @@
environment = {
persistence."/persist" = {
hideMounts = true;
directories = ["/var/lib/nixos"];
directories = [
"/var/lib/nixos"
"/var/lib/gitea"
];
};
systemPackages = with pkgs; [
git

View File

@ -1,3 +1,4 @@
{pkgs}: {
my-vim = pkgs.callPackage ./my-vim {};
my-site = pkgs.callPackage ./my-site {};
}

View File

@ -0,0 +1,2 @@
{writeTextDir}:
writeTextDir "index.html" "my-site"