From 8065a509a499e4a255e8c9a041bcc49526571289 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 5 Jan 2017 23:48:09 +0100 Subject: [PATCH] services.nix-daemon: use wrapper to possibly avoid launchd startup issues --- modules/services/activate-system.nix | 2 +- modules/services/nix-daemon.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/activate-system.nix b/modules/services/activate-system.nix index e040f571..3eca25a0 100644 --- a/modules/services/activate-system.nix +++ b/modules/services/activate-system.nix @@ -41,7 +41,7 @@ in config = mkIf cfg.enable { launchd.daemons.activate-system = { - serviceConfig.ProgramArguments = [ "/bin/sh" "${activateScript}" ]; + serviceConfig.ProgramArguments = [ "/bin/sh" "-c" "exec ${activateScript}" ]; serviceConfig.KeepAlive.SuccessfulExit = false; serviceConfig.RunAtLoad = true; }; diff --git a/modules/services/nix-daemon.nix b/modules/services/nix-daemon.nix index e8574e88..45f7d091 100644 --- a/modules/services/nix-daemon.nix +++ b/modules/services/nix-daemon.nix @@ -38,7 +38,7 @@ in ''; launchd.daemons.nix-daemon = { - serviceConfig.Program = "${config.nix.profile}/bin/nix-daemon"; + serviceConfig.ProgramArguments = [ "/bin/sh" "-c" "exec ${config.nix.profile}/bin/nix-daemon" ]; serviceConfig.KeepAlive = true; serviceConfig.ProcessType = "Background"; serviceConfig.LowPriorityIO = config.nix.daemonIONice;