NixOS configuration 馃獎
fork

Configure Feed

Select the types of activity you want to include in your feed.

at refactor/sway 56 lines 1.1 kB view raw
1{ 2 lib, 3 self, 4 config, 5 ... 6}: 7let 8 inherit (lib) mkIf; 9 inherit (lib.types) bool; 10 11 inherit (self.lib.modules) mkOpt; 12 13 cfg = config.sylveon.services.nginx; 14in 15{ 16 17 options.sylveon.services.nginx = { 18 enable = mkOpt bool false "Enable Nginx proxy"; 19 }; 20 21 config = mkIf cfg.enable { 22 age.secrets.cloudflare-acme.rekeyFile = "${self}/secrets/cloudflare-acme.age"; 23 24 users.users.nginx.extraGroups = [ "acme" ]; 25 26 # Base website ports opened for nginx 27 networking.firewall.allowedTCPPorts = [ 28 80 29 443 30 ]; 31 32 33 services.nginx = { 34 enable = true; 35 36 recommendedGzipSettings = true; 37 recommendedOptimisation = true; 38 recommendedProxySettings = true; 39 recommendedTlsSettings = true; 40 }; 41 42 security.acme = { 43 acceptTerms = true; 44 defaults.email = "d.schumin@proton.me"; 45 certs."xaiya.dev" = { 46 domain = "*.xaiya.dev"; 47 48 dnsProvider = "cloudflare"; 49 webroot = null; 50 51 group = "nginx"; 52 environmentFile = config.age.secrets.cloudflare-acme.path; 53 }; 54 }; 55 }; 56}