From 8a362c0def22dda3785d882f8facb7560534327f Mon Sep 17 00:00:00 2001 From: YI Date: Sat, 5 Oct 2024 04:04:00 +0000 Subject: [PATCH] nix: add default instance to systemd template units --- nix/home.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index a0280ac..4305824 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -1078,7 +1078,10 @@ in After = [ "network-online.target" "network.target" ]; Wants = [ "network-online.target" ]; }; - Install = { WantedBy = [ "default.target" ]; }; + Install = { + WantedBy = [ "default.target" ]; + DefaultInstance = "default"; + }; Service = let commonArgs = "-sshargs='-i %h/.ssh/id_ed25519_unison'"; in { # watch and repeat parameter can't handle non-existent folders. @@ -1107,7 +1110,10 @@ in After = [ "network-online.target" "network.target" ]; Wants = [ "network-online.target" ]; }; - Install = { WantedBy = [ "default.target" ]; }; + Install = { + WantedBy = [ "default.target" ]; + DefaultInstance = "dev"; + }; Service = { # It is ok to pass a non-existent key file. Ssh will warn us, but won't panic.