From 129e3dac840c1cb08b22063e6fff06c17f5bacd6 Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Sat, 17 Aug 2024 11:24:57 +0700 Subject: [PATCH] homeserver: exposed public nas dir --- hardware-configuration/homeserver.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hardware-configuration/homeserver.nix b/hardware-configuration/homeserver.nix index 57a2805..1c51d7b 100644 --- a/hardware-configuration/homeserver.nix +++ b/hardware-configuration/homeserver.nix @@ -58,6 +58,23 @@ ]; }; + services.caddy.virtualHosts."public.tigor.web.id".extraConfig = /*caddy*/ '' + file_server browse + root * /nas/public + ''; + + systemd.tmpfiles.settings = { + "100-nas-public-dir" = { + "/nas/public" = { + d = { + group = config.profile.user.name; + mode = "0777"; + user = config.profile.user.name; + }; + }; + }; + }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.opengl = {