aboutsummaryrefslogtreecommitdiff
path: root/hosts/tower/web
diff options
context:
space:
mode:
authorIsabella Bastaja <isabella@sorre.xyz>2026-08-21 20:28:03 +0200
committerIsabella Bastaja <isabella@sorre.xyz>2026-08-21 20:29:22 +0200
commit6d0ae77a9a6cd42fb43c3bb5a400cdae124ab78d (patch)
treec5685536267fb3244064c01575bd2d722ca5cc44 /hosts/tower/web
parentdc6093d91e0ac0ec6dc76fb16c3648afe4cfb502 (diff)
tower: set up blog
Diffstat (limited to 'hosts/tower/web')
-rw-r--r--hosts/tower/web/blog.nix24
-rw-r--r--hosts/tower/web/caddy.nix23
-rw-r--r--hosts/tower/web/default.nix1
3 files changed, 19 insertions, 29 deletions
diff --git a/hosts/tower/web/blog.nix b/hosts/tower/web/blog.nix
deleted file mode 100644
index 7cefd6e..0000000
--- a/hosts/tower/web/blog.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- inputs,
- pkgs,
- # config,
- ...
-}:
-{
- services.nginx = {
- enable = true;
-
- virtualHosts."sorre.xyz" = {
- # enableACME = true;
- # forceSSL = true;
- root = inputs.sorre-website.packages.${pkgs.system}.default;
- };
-
- virtualHosts."priv.sorre.xyz" = {
- # enableACME = true;
- # forceSSL = true;
- root = "/var/www/priv";
- # basicAuthFile = config.sops.secrets."priv-blog-auth-file".path;
- };
- };
-}
diff --git a/hosts/tower/web/caddy.nix b/hosts/tower/web/caddy.nix
index 0335058..f8924c7 100644
--- a/hosts/tower/web/caddy.nix
+++ b/hosts/tower/web/caddy.nix
@@ -1,23 +1,30 @@
-{ config, lib, ... }:
+{
+ inputs,
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.services.caddy;
+ wg-ip = "100.64.0.6";
vw = {
domain = config.services.vaultwarden.domain;
port = config.services.vaultwarden.config.ROCKET_PORT;
};
-
navidrome = {
domain = "music.sorre.internal";
port = config.services.navidrome.settings.Port;
};
+ blog.port = 7291;
in
{
services.caddy = {
enable = true;
virtualHosts = {
"${vw.domain}" = {
- listenAddresses = [ "100.64.0.6" ];
+ listenAddresses = [ wg-ip ];
extraConfig = ''
tls {$CREDENTIALS_DIRECTORY}/sagittarius.crt {$CREDENTIALS_DIRECTORY}/sagittarius.key
@@ -29,7 +36,7 @@ in
};
"${navidrome.domain}" = {
- listenAddresses = [ "100.64.0.6" ];
+ listenAddresses = [ wg-ip ];
extraConfig = ''
tls {$CREDENTIALS_DIRECTORY}/sagittarius.crt {$CREDENTIALS_DIRECTORY}/sagittarius.key
@@ -40,6 +47,14 @@ in
}
'';
};
+
+ "http://${wg-ip}:${toString blog.port}" = {
+ listenAddresses = [ wg-ip ];
+ extraConfig = ''
+ root ${inputs.sorre-website.packages.${pkgs.system}.default}
+ file_server
+ '';
+ };
};
};
diff --git a/hosts/tower/web/default.nix b/hosts/tower/web/default.nix
index 2cc2e56..db0e406 100644
--- a/hosts/tower/web/default.nix
+++ b/hosts/tower/web/default.nix
@@ -1,7 +1,6 @@
{ ... }:
{
imports = [
- # ./blog.nix
./git.nix
# ./static.nix
./navidrome.nix