]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/aubergine/nginx.nix
aubergine: nginx: enable
[julm/julm-nix.git] / hosts / aubergine / nginx.nix
1 { pkgs, config, hostName, ... }:
2 let
3 inherit (config) networking;
4 inherit (config.services) nginx;
5 in
6 {
7 imports = [
8 ../../nixos/profiles/services/nginx.nix
9 nginx/aubergine.nix
10 ];
11 networking.nftables.ruleset = ''
12 table inet filter {
13 chain input-lan {
14 tcp dport { http } counter accept comment "HTTP"
15 }
16 chain input-intra {
17 tcp dport { http } counter accept comment "HTTP"
18 }
19 }
20 '';
21 /*
22 fileSystems."/var/lib/nginx" = {
23 device = "${hostName}/var/www";
24 fsType = "zfs";
25 };
26 */
27 services.nginx = {
28 enable = true;
29 package = pkgs.nginx.override {
30 modules = with pkgs.nginxModules; [
31 fancyindex
32 ];
33 };
34 resolver = {
35 addresses = [ "127.0.0.1:53" ];
36 valid = "";
37 };
38 virtualHosts."_" = {
39 default = true;
40 extraConfig = ''
41 # Connection closed without response
42 return 444;
43 '';
44 };
45 };
46 }