From bf02d9aeef16b2231caa621d0a068bda30fc3339 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 6 Jan 2025 19:15:58 +0300 Subject: [PATCH] Home: Add Tandoor. --- host/x86_64-linux/home/Bind.nix | 1 + host/x86_64-linux/home/Tandoor.nix | 7 +++++++ host/x86_64-linux/home/nginx/Tandoor.nix | 20 ++++++++++++++++++++ package/homer/Config.nix | 1 + 4 files changed, 29 insertions(+) create mode 100644 host/x86_64-linux/home/Tandoor.nix create mode 100644 host/x86_64-linux/home/nginx/Tandoor.nix diff --git a/host/x86_64-linux/home/Bind.nix b/host/x86_64-linux/home/Bind.nix index 7fc71f9..6e79314 100644 --- a/host/x86_64-linux/home/Bind.nix +++ b/host/x86_64-linux/home/Bind.nix @@ -22,6 +22,7 @@ let (mkBind "privatebin" "/var/lib/privatebin") (mkBind "rabbitmq" "/var/lib/rabbitmq") (mkBind "sieve" "/var/sieve") + (mkBind "tandoor" "/var/lib/tandoor-recipes") (mkBind "terraria" "/var/lib/terraria") (mkBind "uptime_kuma" "/var/lib/uptime-kuma") (mkBind "vaultwarden" "/var/lib/vaultwarden") diff --git a/host/x86_64-linux/home/Tandoor.nix b/host/x86_64-linux/home/Tandoor.nix new file mode 100644 index 0000000..a376cf4 --- /dev/null +++ b/host/x86_64-linux/home/Tandoor.nix @@ -0,0 +1,7 @@ +{ ... }: { + services.tandoor-recipes = { + enable = true; + address = "[::1]"; + port = 33122; + }; +} diff --git a/host/x86_64-linux/home/nginx/Tandoor.nix b/host/x86_64-linux/home/nginx/Tandoor.nix new file mode 100644 index 0000000..df02e61 --- /dev/null +++ b/host/x86_64-linux/home/nginx/Tandoor.nix @@ -0,0 +1,20 @@ +{ ... }: +{ + "craft.voronind.com".extraConfig = '' + listen 443 ssl; + + location / { + allow 10.0.0.0/8; + allow fd09:8d46:b26::/48; + deny all; + + proxy_pass http://[::1]:33122$request_uri; + } + + ssl_certificate /etc/letsencrypt/live/voronind.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/voronind.com/privkey.pem; + include /etc/letsencrypt/conf/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/conf/ssl-dhparams.pem; + ''; +} + diff --git a/package/homer/Config.nix b/package/homer/Config.nix index 2138352..1df8aee 100644 --- a/package/homer/Config.nix +++ b/package/homer/Config.nix @@ -6,6 +6,7 @@ let (mkGroup "App" "fa-server" [ (mkLink "Change" "fa-user-secret" "https://change.voronind.com") (mkLink "Cloud" "fa-cloud" "https://cloud.voronind.com") + (mkLink "Craft" "fa-pen-ruler" "https://craft.voronind.com") (mkLink "Download" "fa-download" "https://download.voronind.com") (mkLink "Git" "fab fa-git-alt" "https://git.voronind.com") (mkLink "Iot" "fa-home" "https://iot.voronind.com")