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