1 { pkgs, lib, config, hostName, ... }:
3 inherit (config) networking;
4 inherit (config.services) nginx;
8 ../../nixos/profiles/services/nginx.nix
9 nginx/sourcephile.fr.nix
11 users.groups."acme".members = [nginx.user];
12 users.groups."keys".members = [nginx.user];
13 users.groups."transmission".members = [nginx.user];
14 networking.nftables.ruleset = ''
17 tcp dport { http, https } counter accept comment "HTTP(S)"
21 fileSystems."/var/lib/nginx" = {
22 device = "${hostName}/var/www";
25 services.upnpc.redirections = [
26 { description = "HTTP"; externalPort = 80; protocol = "TCP"; duration = 30 * 60;
27 service.wantedBy = ["nginx.service"];
28 service.partOf = ["nginx.service"];
30 { description = "HTTPS"; externalPort = 443; protocol = "TCP"; duration = 30 * 60;
31 service.wantedBy = ["nginx.service"];
32 service.partOf = ["nginx.service"];
37 package = pkgs.nginx.override {
38 modules = with pkgs.nginxModules; [
43 addresses = [ "127.0.0.1:53" ];
49 # Connection closed without response
53 useACMEHost = networking.domain;