mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 08:53:56 -05:00
added funni nginx url redirct
This commit is contained in:
parent
a9e363f1ca
commit
01c1429791
2 changed files with 35 additions and 4 deletions
29
hosts/gerg-desktop/funni.nix
Normal file
29
hosts/gerg-desktop/funni.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
_: {config, ...}: {
|
||||
sops.secrets = {
|
||||
ssl_cert = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
};
|
||||
ssl_key = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."nix-fu.com" = {
|
||||
forceSSL = true;
|
||||
sslCertificate = config.sops.secrets.ssl_cert.path;
|
||||
sslCertificateKey = config.sops.secrets.ssl_key.path;
|
||||
serverAliases = ["www.nix-fu.com" "nix-fu.com"];
|
||||
locations."/".return = "301 $scheme://www.github.com/Gerg-L$request_uri";
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [80 443];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue