nginx: refactor to apply settings across all nodes
This commit is contained in:
parent
39c1bc664c
commit
0d0b3e2d2d
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
@ -28,6 +26,4 @@
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults.email = "accounts@katherina.rocks"; # TODO: replace with more appropriate email
|
defaults.email = "accounts@katherina.rocks"; # TODO: replace with more appropriate email
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
}
|
}
|
1
hive.nix
1
hive.nix
|
@ -24,6 +24,7 @@ in {
|
||||||
(import "${sources.home-manager}/nixos")
|
(import "${sources.home-manager}/nixos")
|
||||||
(import "${sources.agenix}/modules/age.nix")
|
(import "${sources.agenix}/modules/age.nix")
|
||||||
./pinning.nix
|
./pinning.nix
|
||||||
|
./common/nginx.nix
|
||||||
./common/ssh.nix
|
./common/ssh.nix
|
||||||
./common/sudo.nix
|
./common/sudo.nix
|
||||||
./common/utilities.nix
|
./common/utilities.nix
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
../../common/nginx.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# TODO: email out
|
# TODO: email out
|
||||||
# TODO: interface customisation
|
# TODO: interface customisation
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services = {
|
||||||
|
nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
"git.qenya.tel" = {
|
"git.qenya.tel" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
@ -20,8 +19,9 @@
|
||||||
locations."/".return = "301 https://git.qenya.tel$request_uri";
|
locations."/".return = "301 https://git.qenya.tel$request_uri";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.forgejo = {
|
forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
stateDir = "/data/forgejo";
|
stateDir = "/data/forgejo";
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -43,4 +43,7 @@
|
||||||
service.DISABLE_REGISTRATION = true;
|
service.DISABLE_REGISTRATION = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue