This repository has no description
1.1 kB
45 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 "nginx"
17 ];
18
19 services.nginx.virtualHosts."lassul.us" = {
20 addSSL = true;
21 enableACME = true;
22 default = true;
23 locations."/".extraConfig = ''
24 root /srv/http/lassul.us;
25 '';
26 locations."= /hosts".extraConfig = ''
27 alias ${pkgs.krebs-hosts_combined};
28 '';
29 locations."= /retiolum.hosts".extraConfig = ''
30 alias ${pkgs.krebs-hosts-retiolum};
31 '';
32 locations."= /wireguard-key".extraConfig = ''
33 alias ${pkgs.writeText "prism.wg" config.krebs.hosts.prism.nets.wiregrill.wireguard.pubkey};
34 '';
35 locations."= /ssh.pub".extraConfig = ''
36 alias ${pkgs.writeText "pub" config.krebs.users.lass.pubkey};
37 '';
38 locations."= /gpg.pub".extraConfig = ''
39 alias ${pkgs.writeText "pub" config.krebs.users.lass.pgp.pubkeys.default};
40 '';
41 locations."= /ip".extraConfig = ''
42 return 200 '$remote_addr';
43 '';
44 };
45}