Compare commits
10 Commits
80d4030a4c
...
e7b194948b
| Author | SHA1 | Date | |
|---|---|---|---|
| e7b194948b | |||
| 2b2f5b223d | |||
| 71a43ffb43 | |||
| 5da4049240 | |||
| 9a5408da00 | |||
| bf18e63d69 | |||
| 1d40e39940 | |||
| 1f4068967a | |||
| 9f10891081 | |||
| 6c4d35c9fe |
@ -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
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
{pkgs}: {
|
||||
my-vim = pkgs.callPackage ./my-vim {};
|
||||
my-site = pkgs.callPackage ./my-site {};
|
||||
}
|
||||
|
||||
2
packages/my-site/default.nix
Normal file
2
packages/my-site/default.nix
Normal file
@ -0,0 +1,2 @@
|
||||
{writeTextDir}:
|
||||
writeTextDir "index.html" "my-site"
|
||||
Loading…
Reference in New Issue
Block a user