diff --git a/machines/solis/configuration.nix b/machines/solis/configuration.nix index 499c9a0..1fd28f4 100644 --- a/machines/solis/configuration.nix +++ b/machines/solis/configuration.nix @@ -29,6 +29,24 @@ services.resolved.enable = true; services.resolved.extraConfig = "DNSStubListener=no\n"; + systemd.timers."backupSyncthing" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; + }; + + systemd.services."backupSyncthing" = { + script = '' + /home/horseman/nix-config/misc/backup.sh + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; + services.samba = { enable = false; securityType = "user"; diff --git a/misc/backup.sh b/misc/backup.sh new file mode 100644 index 0000000..4d0c446 --- /dev/null +++ b/misc/backup.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cd /home/horseman + +tar -cf backups/$(date +%Y-%m-%d).tar Documents