Compare commits

...

10 Commits

3 changed files with 30 additions and 15 deletions

View File

@ -161,6 +161,7 @@
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = "acme.evict519@simplelogin.com"; defaults.email = "acme.evict519@simplelogin.com";
certs."dylanblades.com".extraDomainNames = ["gitea.dylanblades.com"];
}; };
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
@ -195,6 +196,7 @@
}; };
gitea = { gitea = {
enable = true; enable = true;
appName = "Gitea";
settings = { settings = {
server.DOMAIN = "gitea.dylanblades.com"; server.DOMAIN = "gitea.dylanblades.com";
ui.DEFAULT_THEME = "gitea-dark"; ui.DEFAULT_THEME = "gitea-dark";
@ -202,9 +204,15 @@
}; };
nginx = { nginx = {
enable = true; enable = true;
virtualHosts."gitea.dylanblades.com" = { virtualHosts = {
"dylanblades.com" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = pkgs.my-site;
};
"gitea.dylanblades.com" = {
forceSSL = true;
useACMEHost = "dylanblades.com";
locations."/" = { locations."/" = {
proxyPass = "http://localhost:3000"; proxyPass = "http://localhost:3000";
extraConfig = '' extraConfig = ''
@ -220,12 +228,16 @@
}; };
}; };
}; };
};
nixpkgs.overlays = [lib.overlays.pkgs]; nixpkgs.overlays = [lib.overlays.pkgs];
environment = { environment = {
persistence."/persist" = { persistence."/persist" = {
hideMounts = true; hideMounts = true;
directories = ["/var/lib/nixos"]; directories = [
"/var/lib/nixos"
"/var/lib/gitea"
];
}; };
systemPackages = with pkgs; [ systemPackages = with pkgs; [
git git

View File

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

View File

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