chore: move nginx configuration to own file
This commit is contained in:
parent
8412cb21d7
commit
8099b6bf9c
3 changed files with 25 additions and 22 deletions
|
|
@ -7,6 +7,7 @@ in
|
|||
./hardware-configuration.nix
|
||||
./firewall.nix
|
||||
(import ./acme.nix { inherit base-domain; })
|
||||
(import ./nginx.nix { inherit base-domain; })
|
||||
(import ./sourcehut.nix { inherit base-domain; })
|
||||
./userprogs.nix
|
||||
];
|
||||
|
|
|
|||
24
nginx.nix
Normal file
24
nginx.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ base-domain, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"${base-domain}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
"sourcehut.${base-domain}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
"meta.sourcehut.${base-domain}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
"git.sourcehut.${base-domain}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -43,27 +43,5 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"${base-domain}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
"${fqdn}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
"meta.${fqdn}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
"git.${fqdn}" = {
|
||||
enableACME = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql.enable = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue