mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 02:09:04 +02:00
Refactored modules
This commit is contained in:
parent
56c0af44ca
commit
f4f5d6e869
16 changed files with 368 additions and 24 deletions
30
modules/nginx/default.nix
Normal file
30
modules/nginx/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.luj.nginx;
|
||||
in {
|
||||
|
||||
options.luj.nginx = {
|
||||
enable = mkEnableOption "activate nginx service";
|
||||
email = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
security.acme.email = "${cfg.email}";
|
||||
security.acme.acceptTerms = true;
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedTlsSettings = true;
|
||||
clientMaxBodySize = "128m";
|
||||
|
||||
commonHttpConfig = ''
|
||||
server_names_hash_bucket_size 128;
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue