services/website: init
This commit is contained in:
parent
f35d104f84
commit
93279eb6e6
4 changed files with 27 additions and 1 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
modules.services.nginx
|
modules.services.nginx
|
||||||
modules.services.postgres
|
modules.services.postgres
|
||||||
modules.services.unbound
|
modules.services.unbound
|
||||||
|
modules.services.website
|
||||||
|
|
||||||
./filesystem.nix
|
./filesystem.nix
|
||||||
./kernel.nix
|
./kernel.nix
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ in {
|
||||||
./services/transmission.nix
|
./services/transmission.nix
|
||||||
./services/unbound.nix
|
./services/unbound.nix
|
||||||
./services/vaultwarden.nix
|
./services/vaultwarden.nix
|
||||||
|
./services/website.nix
|
||||||
];
|
];
|
||||||
system = mkAttrsFromPaths [
|
system = mkAttrsFromPaths [
|
||||||
./system/aagl.nix
|
./system/aagl.nix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, inputs, ... }: {
|
{ config, ... }: {
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
|
|
|
||||||
24
modules/services/website.nix
Normal file
24
modules/services/website.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ inputs, ... }: {
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
"lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = inputs.website.outPath;
|
||||||
|
};
|
||||||
|
"cdn.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = "/persist/cdn";
|
||||||
|
};
|
||||||
|
"_" = {
|
||||||
|
default = true;
|
||||||
|
addSSL = true;
|
||||||
|
# TODO generate this somewhere
|
||||||
|
sslCertificate = "/persist/fakeCerts/fake.crt";
|
||||||
|
sslCertificateKey = "/persist/fakeCerts/fake.key";
|
||||||
|
extraConfig = ''
|
||||||
|
return 444;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue