diff options
Diffstat (limited to 'hosts/aptos/default.nix')
-rw-r--r-- | hosts/aptos/default.nix | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/hosts/aptos/default.nix b/hosts/aptos/default.nix index 6326615..b2236f5 100644 --- a/hosts/aptos/default.nix +++ b/hosts/aptos/default.nix @@ -1,10 +1,12 @@ -{ self, ... }: - +{ self, config, ... }: +let + secrets = config.age.secrets; + ssh-key-path = secrets."restic/ssh-key".path; +in { imports = [ ./hardware.nix ./networking.nix - ./services.nix "${self}/profiles/btrfs.nix" "${self}/profiles/documentation.nix" "${self}/profiles/laptop.nix" @@ -12,6 +14,30 @@ "${self}/profiles/hardware/xps9300.nix" ]; + my.services.backup = { + enable = true; + repository = "sftp:192.168.6.40:/${config.networking.hostName}"; + exclude = [ + # paths that I don't want to backup + "/home/fcuny/workspace/tmp" + + # various development related files + "**/target" + "**/.direnv" + "**/result" + ]; + timerConfig = { OnCalendar = "06:30"; }; + passwordFile = secrets."restic/repo-users".path; + extraOptions = [ + "sftp.command='ssh backup@192.168.6.40 -i ${ssh-key-path} -s sftp'" + ]; + paths = [ + "/home/fcuny/workspace" + "/home/fcuny/media" + "/home/fcuny/documents" + ]; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave |