This repository has no description
1.1 kB
39 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."= /hosts".extraConfig = ''
21 alias ${pkgs.krebs-hosts_combined};
22 '';
23 locations."= /retiolum.hosts".extraConfig = ''
24 alias ${pkgs.krebs-hosts-retiolum};
25 '';
26 locations."= /wireguard-key".extraConfig = ''
27 alias ${pkgs.writeText "neoprism.wg" config.krebs.hosts.neoprism.nets.wiregrill.wireguard.pubkey};
28 '';
29 locations."= /ssh.pub".extraConfig = ''
30 alias ${pkgs.writeText "pub" config.krebs.users.lass-yubikey.pubkey};
31 '';
32 locations."= /gpg.pub".extraConfig = ''
33 alias ${pkgs.writeText "pub" config.krebs.users.lass-yubikey.pgp.pubkeys.default};
34 '';
35 locations."= /ip".extraConfig = ''
36 return 200 '$remote_addr';
37 '';
38 };
39}