nixos/services: update dependency options for network-required services

This commit is contained in:
Gabriel Arazas 2024-08-21 18:11:31 +08:00
parent 4bb9d7808f
commit e4b63c084a
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
3 changed files with 8 additions and 3 deletions

View File

@ -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 = {

View File

@ -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" ];

View File

@ -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;