File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ { ... } :
2
+ {
3
+ services . caddy = {
4
+ enable = true ;
5
+ } ;
6
+
7
+ networking . firewall = {
8
+ allowedTCPPorts = [
9
+ 80
10
+ 443
11
+ ] ;
12
+ allowedUDPPorts = [ 443 ] ;
13
+ } ;
14
+ }
Original file line number Diff line number Diff line change 15
15
inputs . agenix . nixosModules . age
16
16
17
17
./blockgame-meta.nix
18
+ ./caddy.nix
18
19
./comin.nix
19
20
./disks.nix
20
21
./letterbox.nix
Original file line number Diff line number Diff line change 1
1
{ config , ... } :
2
+ let
3
+ fqdn = "prometheus.andesite.prismlauncher.org" ;
4
+ in
2
5
{
3
6
imports = [
4
7
./exporters/node.nix
14
17
] ;
15
18
16
19
globalConfig . scrape_interval = "15s" ;
20
+ webExternalUrl = "https://${ fqdn } /" ;
17
21
18
22
alertmanagers = [
19
23
{
55
59
config . services . prometheus . port
56
60
] ;
57
61
62
+ services . caddy . virtualHosts . ${ fqdn } . extraConfig = ''
63
+ reverse_proxy localhost:${ toString config . services . prometheus . port }
64
+ '' ;
65
+
58
66
environment . persistence . "/nix/persistence" . directories = [
59
67
"/var/lib/prometheus2"
60
68
] ;
Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ resource "cloudflare_dns_record" "andesite6" {
42
42
ttl = 1
43
43
}
44
44
45
+ resource "cloudflare_dns_record" "prometheus_andesite" {
46
+ zone_id = var. zone_id
47
+ name = " prometheus.andesite.prismlauncher.org"
48
+ content = " andesite.prismlauncher.org"
49
+ type = " CNAME"
50
+ ttl = 1
51
+ }
52
+
45
53
resource "local_file" "andesite-facts" {
46
54
content = jsonencode ({
47
55
" hostname" = hcloud_server.andesite.name
You can’t perform that action at this time.
0 commit comments