diff --git a/dockerfiles/caddy.Dockerfile b/dockerfiles/caddy.Dockerfile new file mode 100644 index 0000000..eda476f --- /dev/null +++ b/dockerfiles/caddy.Dockerfile @@ -0,0 +1,8 @@ +FROM caddy:2.8-builder AS builder + +RUN xcaddy build \ + --with github.com/caddy-dns/transip + +FROM caddy:2.8 + +COPY --from=builder /usr/bin/caddy /usr/bin/caddy diff --git a/hosts/v-th-ctr-01/default.nix b/hosts/v-th-ctr-01/default.nix index 6f42900..40b58f9 100644 --- a/hosts/v-th-ctr-01/default.nix +++ b/hosts/v-th-ctr-01/default.nix @@ -56,8 +56,12 @@ networking.firewall = { enable = true; - allowedTCPPorts = [ 80 443 53 ]; - allowedUDPPorts = [ 80 443 53 ]; + allowedTCPPorts = [ 1080 1443 1053 ]; + allowedUDPPorts = [ 1080 1443 1053 ]; + }; + + networking.hosts = { + "127.0.0.1" = [ "tbmrs.nl" ]; }; users.users.deploy = { diff --git a/hosts/v-th-ctr-01/home.nix b/hosts/v-th-ctr-01/home.nix index 5538f19..d97da91 100644 --- a/hosts/v-th-ctr-01/home.nix +++ b/hosts/v-th-ctr-01/home.nix @@ -23,7 +23,7 @@ applications.ssh.enable = true; applications.thunderbird.enable = false; applications.yazi.enable = true; - applications.zellij.enable = false; + applications.zellij.enable = true; services.nextcloud-sync.enable = false; services.podman.enable = true; @@ -42,6 +42,8 @@ }; home.packages = with pkgs; [ + unstable.helix + lazygit ]; # Enable home-manager diff --git a/modules/home/containers/caddy.nix b/modules/home/containers/caddy.nix index 669d2a2..b150e8c 100644 --- a/modules/home/containers/caddy.nix +++ b/modules/home/containers/caddy.nix @@ -17,18 +17,28 @@ in { config = mkIf cfg.enable { services.podman.containers.caddy = { - image = "ghcr.io/iarekylew00t/caddy-cloudflare:latest"; + image = "localhost/tboomers/caddy-custom:latest"; ports = [ "1080:80" - "1443:8443" + "1443:443" ]; volumes = [ - "/home/deploy/containers/caddy/Caddyfile:/etc/caddy/Caddyfile:Z" + "%h/containers/caddy/Caddyfile:/etc/caddy/Caddyfile" + "%h/containers/caddy/acme_key:/etc/caddy/acme_key" + "%h/containers/caddy/data:/data" ]; }; home.file."containers/caddy/Caddyfile".text = '' - http://localhost { + { + acme_dns transip xeovalyte /etc/caddy/acme_key + } + + tbmrs.nl { + respond "Hello there" + } + + http://tbmrs.nl { respond "Hello there" } '';