router: add secrix for secrets; add cloudflare api key

This commit is contained in:
2025-05-11 21:25:34 -07:00
parent bb633e5bce
commit afa39585d6
6 changed files with 47 additions and 9 deletions

View File

@@ -10,6 +10,8 @@
./kea.nix
./services.nix
];
# Secrix for secrets management
secrix.hostPubKey = vars.pubkey;
# Bootloader.
boot.loader.systemd-boot.enable = true;

View File

@@ -47,6 +47,8 @@ in
};
};
secrix.system.secrets.cf-api-key.encrypted.file = ../../secrets/cf_api_key.age;
systemd.services.caddy.serviceConfig.EnvironmentFile = config.secrix.system.secrets.cf-api-key.decrypted.path;
services.caddy = {
enable = true;
package = pkgs.caddy.withPlugins {
@@ -55,7 +57,7 @@ in
};
virtualHosts."grouter.${domain}".extraConfig = ''
tls {
dns cloudflare xx
dns cloudflare {env.CF_API_KEY}
resolvers 1.1.1.1
}
@grafana path /grafana /grafana/*

View File

@@ -31,6 +31,7 @@ let
};
in
rec {
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFobB87yYVwhuYrA+tfztLuks3s9jZOqEFktwGw1mo83 root@grouter";
domain = "cazzzer.com";
ldomain = "l.${domain}";
sysdomain = "sys.${domain}";