Added an option to easily allow everyone to use "at".
svn path=/nixos/trunk/; revision=12531
This commit is contained in:
parent
791d8bbc66
commit
014b33637c
|
@ -650,6 +650,14 @@
|
|||
Whether to enable the `at' daemon, a command scheduler.
|
||||
'';
|
||||
};
|
||||
|
||||
allowEveryone = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to make /var/spool/at{jobs,spool} writeable
|
||||
by everyone (and sticky).
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
locate = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ at }:
|
||||
{ at, config }:
|
||||
|
||||
let uid = (import ../system/ids.nix).uids.atd;
|
||||
gid = (import ../system/ids.nix).gids.atd;
|
||||
|
@ -44,6 +44,7 @@ start script
|
|||
fi
|
||||
done
|
||||
chmod 1770 "$spooldir" "$jobdir"
|
||||
${if config.allowEveryone then ''chmod a+rwxt "$spooldir" "$jobdir" '' else ""}
|
||||
if [ ! -f "$etcdir"/at.deny ]
|
||||
then
|
||||
touch "$etcdir"/at.deny && \
|
||||
|
|
|
@ -173,6 +173,7 @@ let
|
|||
++ optional config.services.atd.enable
|
||||
(import ../upstart-jobs/atd.nix {
|
||||
at = pkgs.at;
|
||||
config = config.services.atd;
|
||||
})
|
||||
|
||||
# DHCP client.
|
||||
|
|
Loading…
Reference in New Issue