summaryrefslogtreecommitdiffstats
path: root/hosts/poweredge
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/poweredge')
-rw-r--r--hosts/poweredge/filebrowser.nix36
-rw-r--r--hosts/poweredge/router-hosts.nix2
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"; };