From 9373c2c949dda98a162e867a0ee125dfedc4d799 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 21 Nov 2023 13:01:45 +0100 Subject: [PATCH] yodaHedgehog: backup service --- hosts/yodaHedgehog/host-specific.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/yodaHedgehog/host-specific.nix b/hosts/yodaHedgehog/host-specific.nix index a4414fa..35604bc 100644 --- a/hosts/yodaHedgehog/host-specific.nix +++ b/hosts/yodaHedgehog/host-specific.nix @@ -43,6 +43,11 @@ in }; }; systemd.services."daily-backup-and-suspend" = { + # If the system wakes up at 00:05, it is not directly connected to the Internet. + # Thus, `btrbk` might fail with the following error while connecting to `rootNas`: + # ssh: Could not resolve hostname p1st.de: Name or service not known + # To avoid this, we depend on the `network-online` systemd target. + after = [ "network-online.target" ]; # Packages required for this script. # For `ssh` and `journalwatch`, there are assertions above. path = with pkgs; [