From 35ec6b0cc56295c797651daf404768826702dac7 Mon Sep 17 00:00:00 2001 From: Goldstein Date: Sat, 10 Sep 2022 22:46:07 +0300 Subject: [PATCH] better startup logic --- module.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module.nix b/module.nix index 9fc8ddb..eb7b0b2 100644 --- a/module.nix +++ b/module.nix @@ -75,10 +75,12 @@ in config = { environment.systemPackages = [ classified ]; systemd.services.classified = ifEnabled { } { - wantedBy = [ "multi-user.target" ]; + wantedBy = [ "basic.target" ]; restartTriggers = [ jsonConfig ]; + serviceConfig.Type = "notify"; script = '' ${classified}/bin/classified batch ${jsonConfig} + ${pkgs.systemd}/bin/systemd-notify --ready ${pkgs.coreutils}/bin/sleep inf ''; };