[Nix-dev] Setting up crontab as nixos user

Luca Bruno lethalman88 at gmail.com
Fri Sep 5 22:18:07 CEST 2014


I think in this case it's very correct to patch cron and set PATH
to $HOME/.nix-profile/bin:/run/current-system/sw/bin


On Fri, Sep 5, 2014 at 9:17 PM, Bjørn Forsman <bjorn.forsman at gmail.com>
wrote:

> I tried exporting some environment variables in the cron nixos module.
> But cron insists on controlling the environment it gives to child
> processes and throws away the variables I give it. Too bad.
>
> I see the same issue on Ubuntu where the system crontab has a PATH=...
> line including among other things /usr/local/bin. But as this is not
> propagated to user crontab, the processes run there get the default
> path of /usr/bin:/bin (same as on NixOS).
>
> IMHO, someone (upstream) should fix cron to stop messing with the
> environment. The current behaviour may have been appropriate in the
> SysV init days, but now we have better ways to control cron's
> environment (i.e. systemd).
>
> Best regards,
> Bjørn Forsman
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
www.debian.org - The Universal Operating System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140905/d284fcf0/attachment.html 


More information about the nix-dev mailing list