diff --git a/modules/nixos/services/archivebox.nix b/modules/nixos/services/archivebox.nix index be0b58de..6b64b1c5 100644 --- a/modules/nixos/services/archivebox.nix +++ b/modules/nixos/services/archivebox.nix @@ -46,7 +46,8 @@ let (jobUnitName name) { description = "Archivebox download group '${name}'"; - after = [ "network.target" ]; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; documentation = [ "https://docs.archivebox.io/" ]; preStart = '' mkdir -p ${lib.escapeShellArg cfg.archivePath} @@ -189,7 +190,8 @@ in (lib.mkIf cfg.webserver.enable { systemd.services.archivebox-server = { description = "Archivebox web server"; - after = [ "network.target" ]; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; documentation = [ "https://docs.archivebox.io/" ]; wantedBy = [ "graphical-session.target" ]; serviceConfig = { diff --git a/modules/nixos/services/wezterm-mux-server.nix b/modules/nixos/services/wezterm-mux-server.nix index b14d77dc..bf93696f 100644 --- a/modules/nixos/services/wezterm-mux-server.nix +++ b/modules/nixos/services/wezterm-mux-server.nix @@ -31,7 +31,8 @@ in config = lib.mkIf cfg.enable { systemd.services.wezterm-mux-server = { description = "Wezterm mux server"; - after = [ "network.target" ]; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; path = [ cfg.package ]; wantedBy = [ "multi-user.target" ]; diff --git a/modules/nixos/services/yt-dlp.nix b/modules/nixos/services/yt-dlp.nix index 788f045f..2990999c 100644 --- a/modules/nixos/services/yt-dlp.nix +++ b/modules/nixos/services/yt-dlp.nix @@ -124,6 +124,8 @@ in in lib.nameValuePair (jobUnitName name) { wantedBy = [ "multi-user.target" ]; + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; description = "yt-dlp archive job for group '${name}'"; documentation = [ "man:yt-dlp(1)" ]; enable = true;