diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-11-24 12:41:12 -0600 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-11-24 12:41:12 -0600 |
| commit | 7b80d304cd25f66931885e190ad7790188b2f5d0 (patch) | |
| tree | 66802cadfae3428547e66cccc8a6fee0563c3b63 | |
| parent | ab601cd52d4ada28eb4e9b02959df096a443d857 (diff) | |
| download | nixos-7b80d304cd25f66931885e190ad7790188b2f5d0.tar.xz nixos-7b80d304cd25f66931885e190ad7790188b2f5d0.zip | |
replace filebrowser w/ filebrowser-quantum
| -rw-r--r-- | hosts/poweredge/filebrowser.nix | 36 | ||||
| -rw-r--r-- | hosts/poweredge/router-hosts.nix | 2 |
2 files changed, 31 insertions, 7 deletions
diff --git a/hosts/poweredge/filebrowser.nix b/hosts/poweredge/filebrowser.nix index 681a6a6..6574c6c 100644 --- a/hosts/poweredge/filebrowser.nix +++ b/hosts/poweredge/filebrowser.nix @@ -3,24 +3,48 @@ autoStart = true; privateNetwork = true; hostBridge = "br-lan0"; - localMacAddress = "02:00:00:00:00:05"; + localMacAddress = "02:00:00:00:01:45"; + ephemeral = true; # Host path bindMounts = { - "/var/lib/filebrowser/data" = { + "/var/lib/filebrowser" = { + hostPath = "/nix/persist/filebrowser"; + isReadOnly = false; + }; + "/media" = { hostPath = "/media"; isReadOnly = true; }; }; - config = { lib, pkg, config, ... }: { + config = { lib, pkgs, config, ... }: let + FILEBROWSER_CONFIG = "${(pkgs.formats.yaml { }).generate "config.yaml" { + server = { + port = 8080; + database = "/var/lib/filebrowser/database.db"; + sources = [ { path = "/media"; } ]; + }; + }}"; + in { # Network networking.interfaces.eth0.useDHCP = true; networking.firewall.allowedTCPPorts = [ 80 8080 ]; # Caddy + filebrowser - # Filebrowser - services.filebrowser.enable = true; - services.filebrowser.settings.address = "0.0.0.0"; + # Filebrowser-quantum + services.filebrowser = { + enable = true; + package = pkgs.filebrowser-quantum; + }; + + # Edit systemd service for filebrowser to make it compatible w/ filebrowser-quantum + systemd.services.filebrowser = { + #environment.FILEBROWSER_DATABASE = + environment = { inherit FILEBROWSER_CONFIG; }; + serviceConfig = { + ExecStart = lib.mkForce (lib.getExe pkgs.filebrowser-quantum); + }; + }; # Reverse proxy services.caddy = { diff --git a/hosts/poweredge/router-hosts.nix b/hosts/poweredge/router-hosts.nix index 4e14c01..2e0dfc5 100644 --- a/hosts/poweredge/router-hosts.nix +++ b/hosts/poweredge/router-hosts.nix @@ -26,7 +26,7 @@ let jellyfin = { macAddress = "02:00:00:00:00:02"; staticIp = "192.168.1.42"; }; gitea = { macAddress = "02:00:00:00:00:03"; staticIp = "192.168.1.43"; }; bitcoind = { macAddress = "02:00:00:00:00:04"; staticIp = "192.168.1.44"; }; - filebrowser = { macAddress = "02:00:00:00:00:05"; staticIp = "192.168.1.45"; }; + filebrowser = { macAddress = "02:00:00:00:01:45"; staticIp = "192.168.1.45"; }; grafana = { macAddress = "02:00:00:00:00:06"; staticIp = "192.168.1.46"; }; transmission = { macAddress = "02:00:00:00:01:47"; staticIp = "192.168.1.47"; }; navidrome = { macAddress = "02:00:00:00:00:08"; staticIp = "192.168.1.48"; }; |
