forked from aylac.top/nixcfg
this repo has no description
1{ 2 config, 3 lib, 4 self, 5 ... 6}: { 7 options.myNixOS.services.cloudflared.enable = lib.mkEnableOption "Cloudflared for all your cloudflare tunnels needs"; 8 9 config = lib.mkIf config.myNixOS.services.cloudflared.enable { 10 age.secrets = { 11 cloudflareCertificate.file = "${self.inputs.secrets}/cloudflare/certificate.age"; 12 cloudflareCredentials.file = "${self.inputs.secrets}/cloudflare/credentials.age"; 13 }; 14 15 services.cloudflared = { 16 enable = true; 17 certificateFile = config.age.secrets.cloudflareCertificate.path; 18 tunnels = { 19 ${config.mySnippets.aylac-top.cloudflareTunnel} = { 20 certificateFile = config.age.secrets.cloudflareCertificate.path; 21 credentialsFile = config.age.secrets.cloudflareCredentials.path; 22 default = "http_status:404"; 23 }; 24 }; 25 }; 26 }; 27}