From 7a7c28526353ec6f88a291c990285ba27b8e99a4 Mon Sep 17 00:00:00 2001 From: Isabella Bastaja Date: Tue, 1 Sep 2026 15:46:19 +0200 Subject: tower: fix static host --- hosts/enode/default.nix | 1 + hosts/enode/disko.nix | 32 ++++++++++++++++++++++++++++++++ hosts/tower/web/caddy.nix | 11 +++++++---- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 hosts/enode/disko.nix diff --git a/hosts/enode/default.nix b/hosts/enode/default.nix index 33790b4..bd44d79 100644 --- a/hosts/enode/default.nix +++ b/hosts/enode/default.nix @@ -1,6 +1,7 @@ { pkgs, modulesPath, ... }: { imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" + # "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ./headscale.nix ./caddy.nix ]; diff --git a/hosts/enode/disko.nix b/hosts/enode/disko.nix new file mode 100644 index 0000000..82e7d5f --- /dev/null +++ b/hosts/enode/disko.nix @@ -0,0 +1,32 @@ +{ + disko.devices.disk.vm-disk = { + device = "/dev/vda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "1G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "umask=0077" + "nofail" + ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; +} diff --git a/hosts/tower/web/caddy.nix b/hosts/tower/web/caddy.nix index 59c5353..5efdbc3 100644 --- a/hosts/tower/web/caddy.nix +++ b/hosts/tower/web/caddy.nix @@ -116,10 +116,13 @@ in ''; }; - "static.sorre.xyz".extraConfig = '' - root /var/lib/www/static - file_server - ''; + "http://static.sorre.xyz" = { + listenAddresses = [ wg-ip ]; + extraConfig = '' + root /var/lib/www/static + file_server + ''; + }; }; }; -- cgit v1.3.1