diff --git a/hosts/hl-bigbox1.nix b/hosts/hl-bigbox1.nix index c6d14bf..f6cbcab 100644 --- a/hosts/hl-bigbox1.nix +++ b/hosts/hl-bigbox1.nix @@ -44,4 +44,24 @@ jellyfin-web jellyfin-ffmpeg ]; + + systemd.timers."backup-jellyfin" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + Unit = "backup-jellyfin.service"; + }; + }; + + systemd.services."backup-jellyfin" = { + script = '' + set -eu + ${pkgs.rsync}/bin/rsync -avpzP --delete /opt/jellyfin /mnt/terra1/Data/apps/ + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; } diff --git a/hosts/hl-fws1.nix b/hosts/hl-fws1.nix index 77dd625..219a008 100644 --- a/hosts/hl-fws1.nix +++ b/hosts/hl-fws1.nix @@ -1,6 +1,6 @@ { user }: { pkgs, lib, config, ... }: { - imports = [ ./hl-minipc1.hardware-configuration.nix ]; + imports = [ ./hl-fws1.hardware-configuration.nix ]; skyg.user.enable = true; skyg.nixos.common.ssh-server.enable = true; skyg.server.admin.enable = true;