This repository has no description
1.4 kB
54 lines
1{ config, pkgs, lib, ... }:
2{
3 imports = [
4 ./default.nix
5 ];
6
7 security.acme = {
8 email = "acme@lassul.us";
9 acceptTerms = true;
10 certs."lassul.us" = {
11 group = "lasscert";
12 };
13 };
14
15 users.groups.lasscert.members = [
16 "dovecot2"
17 "exim"
18 "nginx"
19 ];
20
21 services.nginx.virtualHosts."lassul.us" = {
22 addSSL = true;
23 enableACME = true;
24 default = true;
25 locations."/".extraConfig = ''
26 root /srv/http/lassul.us;
27 '';
28 locations."= /retiolum-hosts.tar.bz2".extraConfig = ''
29 alias ${config.krebs.tinc.retiolum.hostsArchive};
30 '';
31 locations."= /hosts".extraConfig = ''
32 alias ${pkgs.krebs-hosts_combined};
33 '';
34 locations."= /retiolum.hosts".extraConfig = ''
35 alias ${pkgs.krebs-hosts-retiolum};
36 '';
37 locations."= /wireguard-key".extraConfig = ''
38 alias ${pkgs.writeText "prism.wg" config.krebs.hosts.prism.nets.wiregrill.wireguard.pubkey};
39 '';
40 locations."= /krebspage".extraConfig = ''
41 default_type "text/html";
42 alias ${pkgs.krebspage}/index.html;
43 '';
44 locations."= /ssh.pub".extraConfig = ''
45 alias ${pkgs.writeText "pub" config.krebs.users.lass.pubkey};
46 '';
47 locations."= /gpg.pub".extraConfig = ''
48 alias ${pkgs.writeText "pub" config.krebs.users.lass.pgp.pubkeys.default};
49 '';
50 locations."= /ip".extraConfig = ''
51 return 200 '$remote_addr';
52 '';
53 };
54}