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