From 2761fc8953062cebf211a9627f3dc37c2d03e1af Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 2 Sep 2025 16:56:24 +0200 Subject: [PATCH] filebrowser: Configure backups --- hosts/srv-internal/default.nix | 1 + modules/system/services/filebrowser.nix | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/hosts/srv-internal/default.nix b/hosts/srv-internal/default.nix index 7137a05..c444d62 100644 --- a/hosts/srv-internal/default.nix +++ b/hosts/srv-internal/default.nix @@ -39,6 +39,7 @@ filebrowser = { enable = true; + doBackups = true; domain = "files.${config.custom.services.tailscale.domain}"; }; diff --git a/modules/system/services/filebrowser.nix b/modules/system/services/filebrowser.nix index 6d02c2c..92c98d1 100644 --- a/modules/system/services/filebrowser.nix +++ b/modules/system/services/filebrowser.nix @@ -12,6 +12,7 @@ in options.custom.services.filebrowser = { enable = lib.mkEnableOption ""; + doBackups = lib.mkEnableOption ""; domain = lib.mkOption { type = lib.types.nonEmptyStr; default = ""; @@ -35,5 +36,13 @@ in noauth = true; }; }; + + custom.services.resticBackups.filebrowser = lib.mkIf cfg.doBackups { + conflictingService = "filebrowser.service"; + extraConfig.paths = with config.services.filebrowser.settings; [ + database + root + ]; + }; }; }