]> Git — Sourcephile - sourcephile-nix.git/blob - machines/losurdo/nginx.nix
ssh: add reverse ssh giving access to losurdo from mermet
[sourcephile-nix.git] / machines / losurdo / nginx.nix
1 { pkgs, lib, config, ... }:
2 let
3 inherit (config) networking;
4 inherit (config.services) nginx;
5 in
6 {
7 imports = [
8 ../../nixos/profiles/services/nginx.nix
9 nginx/sourcephile.fr.nix
10 ];
11 users.groups."acme".members = [nginx.user];
12 users.groups."transmission".members = [nginx.user];
13 networking.nftables.ruleset = ''
14 add rule inet filter net2fw tcp dport 8443 counter accept comment "HTTPS"
15 '';
16 services.nginx = {
17 enable = true;
18 package = pkgs.nginx.override {
19 modules = with pkgs.nginxModules; [
20 fancyindex
21 ];
22 };
23 resolver = {
24 addresses = [ "127.0.0.1:53" ];
25 valid = "";
26 };
27 virtualHosts."_" = {
28 listen = [ { addr = "0.0.0.0"; port = 8443; ssl = true; } ];
29 onlySSL = true;
30 #forceSSL = true;
31 useACMEHost = networking.domain;
32 };
33 };
34 }