hai! wo? ich bin ein fisch.
This commit is contained in:
parent
eaea15fa3a
commit
ef91935d4b
14 changed files with 196 additions and 5 deletions
57
modules/server/nginx.nix
Normal file
57
modules/server/nginx.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
domain = lib.mkOption {
|
||||
default = "example.com";
|
||||
description = "set domain name";
|
||||
};
|
||||
email = lib.mkOption {
|
||||
default = "${config.main-user.userName}.${config.domain}";
|
||||
description = "set email";
|
||||
};
|
||||
nginx = {
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
users = {
|
||||
users = {
|
||||
nginx = {
|
||||
group = "nginx";
|
||||
extraGroups = [
|
||||
"acme"
|
||||
"users"
|
||||
];
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
groups = {
|
||||
nginx = { };
|
||||
};
|
||||
};
|
||||
services = {
|
||||
nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
clientMaxBodySize = "10G";
|
||||
statusPage = true;
|
||||
};
|
||||
};
|
||||
security = {
|
||||
acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = config.email;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue