···11+{
22+ pkgs,
33+ config,
44+ lib,
55+ ...
66+}:
77+88+{
99+ systemd.services.cloudflared-remote = {
1010+ description = "Cloudflare Tunnel (Remote Managed) for Lairland HQ";
1111+ wantedBy = [ "multi-user.target" ];
1212+ after = [ "network-online.target" ];
1313+ serviceConfig = {
1414+ # Use an EnvironmentFile to securely load the TUNNEL_TOKEN generated by agenix
1515+ EnvironmentFile = "/run/agenix/cftunnels-rtdev-secrets";
1616+ # The run command automatically picks up the TUNNEL_TOKEN environment variable
1717+ ExecStart = "${pkgs.cloudflared}/bin/cloudflared tunnel --no-autoupdate run";
1818+ Restart = "always";
1919+ RestartSec = "5s";
2020+ };
2121+ };
2222+2323+ systemd.services.cloudflared-remote-recaptime-dev = {
2424+ description = "Cloudflare Tunnel (Remote Managed) for Recap Time Squad";
2525+ wantedBy = [ "multi-user.target" ];
2626+ after = [ "network-online.target" ];
2727+ serviceConfig = {
2828+ # Use an EnvironmentFile to securely load the TUNNEL_TOKEN generated by agenix
2929+ EnvironmentFile = "/run/agenix/cftunnels-rtdev-secrets";
3030+ # The run command automatically picks up the TUNNEL_TOKEN environment variable
3131+ ExecStart = "${pkgs.cloudflared}/bin/cloudflared tunnel --no-autoupdate run";
3232+ Restart = "always";
3333+ RestartSec = "5s";
3434+ };
3535+ };
3636+}
+18
secrets/agenix.nix
···11+# This is my agenix setup for all things SecretOps on my NixOS and home-manager
22+# configurations.
33+{ lib, pkgs, config, ... }:
44+55+let
66+ pubkeys = import ../shared/ssh-keys.nix;
77+88+ # start with the host keys
99+ hosts = pubkeys.hosts;
1010+1111+ # the you do you part
1212+ main = pubkeys.personal.y2022;
1313+ work = pubkeys.work.recaptime-dev.crew;
1414+ hardwareKeys = pubkeys.fido2Keys;
1515+in
1616+{
1717+1818+}