summaryrefslogblamecommitdiff
path: root/modules/ddns.nix
blob: 3a3196e43a48eb7d0992bea212bbf0d9ca3c6071 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                                

                                                                                    










                                                           












                                                     
{ config, lib, ...}: with lib; {
  options.santi-modules.services.ddns.enable = mkEnableOption "Enable ddns service";
  config = mkIf config.santi-modules.services.ddns.enable {
    networking.enableIPv6 = true;
    services.cloudflared = {
      enable = true;
      tunnels.iori = {
        default = "http_status:404";
        credentialsFile = "/var/lib/cloudflared/iori.json";
        ingress = {
          "santi.net.br" = "http://localhost:80";
        };
      };
    };
    services.inadyn = {
      enable = true;
      user = "leonardo";
      group = "users";
      settings.provider."cloudflare.com" = {
        hostname="santi.net.br";
        username="santi.net.br";
        proxied = false;
        include = config.age.secrets.cloudflare.path;
      };
    };
  };
}