diff --git a/system/upstart.nix b/system/upstart.nix index 194b6bdb8e18..68dc1e730c3d 100644 --- a/system/upstart.nix +++ b/system/upstart.nix @@ -67,6 +67,7 @@ import ../upstart-jobs/gather.nix { # Nix daemon - required for multi-user Nix. (import ../upstart-jobs/nix-daemon.nix { inherit nix; + inherit (pkgs) openssl; }) # Cron daemon. diff --git a/upstart-jobs/nix-daemon.nix b/upstart-jobs/nix-daemon.nix index d761bcd85a98..acf85c70c9c0 100644 --- a/upstart-jobs/nix-daemon.nix +++ b/upstart-jobs/nix-daemon.nix @@ -1,4 +1,4 @@ -{nix}: +{nix, openssl}: { name = "nix-daemon"; @@ -7,7 +7,11 @@ start on startup stop on shutdown env NIX_CONF_DIR=/nix/etc/nix - respawn ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 + respawn + script + export PATH=${openssl}/bin:$PATH + exec ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 + end script "; }