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