summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/poweredge/filebrowser.nix18
1 files changed, 3 insertions, 15 deletions
diff --git a/hosts/poweredge/filebrowser.nix b/hosts/poweredge/filebrowser.nix
index 818b3df..681a6a6 100644
--- a/hosts/poweredge/filebrowser.nix
+++ b/hosts/poweredge/filebrowser.nix
@@ -13,33 +13,21 @@
};
};
- config = { lib, pkg, config, ... }: let
- publicPort = 9000;
- in {
+ config = { lib, pkg, config, ... }: {
# Network
networking.interfaces.eth0.useDHCP = true;
- networking.firewall.allowedTCPPorts = [ 80 publicPort ]; # Caddy (private + public)
+ networking.firewall.allowedTCPPorts = [ 80 8080 ]; # Caddy + filebrowser
# Filebrowser
services.filebrowser.enable = true;
+ services.filebrowser.settings.address = "0.0.0.0";
# Reverse proxy
services.caddy = {
enable = true;
- # Private
virtualHosts.":80".extraConfig = ''
reverse_proxy localhost:8080
'';
- # Public (not sure why toString is needed but ok)
- virtualHosts.":${toString publicPort}".extraConfig = ''
- @shared {
- path /share/*
- path /static/*
- path /api/public/*
- }
-
- reverse_proxy @shared localhost:8080
- '';
};
system.stateVersion = "26.05";