forked from
lass.pds.lassul.us/superconfig
This repository has no description
1.3 kB
50 lines
1{ config, pkgs, ... }:
2{
3 imports = [
4 ./default.nix
5 ];
6
7 security.acme = {
8 defaults.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."= /ssh.pub".extraConfig = ''
41 alias ${pkgs.writeText "pub" config.krebs.users.lass.pubkey};
42 '';
43 locations."= /gpg.pub".extraConfig = ''
44 alias ${pkgs.writeText "pub" config.krebs.users.lass.pgp.pubkeys.default};
45 '';
46 locations."= /ip".extraConfig = ''
47 return 200 '$remote_addr';
48 '';
49 };
50}