aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/services/scheduling
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 17:37:45 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 18:47:43 +0100
commit408b8b5725c3e6fff75aef772da248d3e95ff414 (patch)
tree692e3b61dbbff85cc97e3becf13a1376dea04a92 /nixos/modules/services/scheduling
parentd882e1966251880240599d3c1b31e060661506ee (diff)
Add lots of missing option types
Diffstat (limited to 'nixos/modules/services/scheduling')
-rw-r--r--nixos/modules/services/scheduling/atd.nix11
-rw-r--r--nixos/modules/services/scheduling/cron.nix22
-rw-r--r--nixos/modules/services/scheduling/fcron.nix17
3 files changed, 33 insertions, 17 deletions
diff --git a/nixos/modules/services/scheduling/atd.nix b/nixos/modules/services/scheduling/atd.nix
index 8c96252668e..c516c5889f1 100644
--- a/nixos/modules/services/scheduling/atd.nix
+++ b/nixos/modules/services/scheduling/atd.nix
@@ -17,18 +17,21 @@ in
options = {
services.atd.enable = mkOption {
+ type = types.bool;
default = false;
description = ''
- Whether to enable the `at' daemon, a command scheduler.
+ Whether to enable the <command>at</command> daemon, a command scheduler.
'';
};
services.atd.allowEveryone = mkOption {
+ type = types.bool;
default = false;
description = ''
- Whether to make /var/spool/at{jobs,spool} writeable
- by everyone (and sticky). This is normally not needed since
- the `at' commands are setuid/setgid `atd'.
+ Whether to make <filename>/var/spool/at{jobs,spool}</filename>
+ writeable by everyone (and sticky). This is normally not
+ needed since the <command>at</command> commands are
+ setuid/setgid <literal>atd</literal>.
'';
};
diff --git a/nixos/modules/services/scheduling/cron.nix b/nixos/modules/services/scheduling/cron.nix
index e14f03fb1e8..44ed1ba5a07 100644
--- a/nixos/modules/services/scheduling/cron.nix
+++ b/nixos/modules/services/scheduling/cron.nix
@@ -11,7 +11,9 @@ let
''
SHELL=${pkgs.bash}/bin/bash
PATH=${config.system.path}/bin:${config.system.path}/sbin
- MAILTO="${config.services.cron.mailto}"
+ ${optionalString (config.services.cron.mailto != null) ''
+ MAILTO="${config.services.cron.mailto}"
+ ''}
NIX_CONF_DIR=/etc/nix
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
'';
@@ -34,21 +36,25 @@ in
services.cron = {
enable = mkOption {
+ type = types.bool;
default = true;
- description = "Whether to enable the `vixie cron' daemon.";
+ description = "Whether to enable the Vixie cron daemon.";
};
mailto = mkOption {
- default = "";
- description = " The job output will be mailed to this email address. ";
+ type = types.nullOr types.str;
+ default = null;
+ description = "Email address to which job output will be mailed.";
};
systemCronJobs = mkOption {
+ type = types.listOf types.str;
default = [];
- example = [
- "* * * * * test ls -l / > /tmp/cronout 2>&1"
- "* * * * * eelco echo Hello World > /home/eelco/cronout"
- ];
+ example = literalExample ''
+ [ "* * * * * test ls -l / > /tmp/cronout 2>&1"
+ "* * * * * eelco echo Hello World > /home/eelco/cronout"
+ ]
+ '';
description = ''
A list of Cron jobs to be appended to the system-wide
crontab. See the manual page for crontab for the expected
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
index 95ff918eb6d..0c0811ca6e0 100644
--- a/nixos/modules/services/scheduling/fcron.nix
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -6,7 +6,7 @@ let
cfg = config.services.fcron;
- queuelen = if cfg.queuelen == "" then "" else "-q ${toString cfg.queuelen}";
+ queuelen = if cfg.queuelen == null then "" else "-q ${toString cfg.queuelen}";
systemCronJobs =
''
@@ -34,33 +34,40 @@ in
services.fcron = {
enable = mkOption {
+ type = types.bool;
default = false;
- description = "Whether to enable the `fcron' daemon.";
+ description = "Whether to enable the <command>fcron</command> daemon.";
};
allow = mkOption {
+ type = types.listOf types.str;
default = [ "all" ];
description = ''
- Users allowed to use fcrontab and fcrondyn (one name per line, "all" for everyone).
+ Users allowed to use fcrontab and fcrondyn (one name per
+ line, <literal>all</literal> for everyone).
'';
};
deny = mkOption {
+ type = types.listOf types.str;
default = [];
description = "Users forbidden from using fcron.";
};
maxSerialJobs = mkOption {
+ type = types.int;
default = 1;
description = "Maximum number of serial jobs which can run simultaneously.";
};
queuelen = mkOption {
- default = "";
- description = "Number of jobs the serial queue and the lavg queue can contain - empty to net set this number (-q)";
+ type = types.nullOr types.int;
+ default = null;
+ description = "Number of jobs the serial queue and the lavg queue can contain.";
};
systab = mkOption {
+ type = types.lines;
default = "";
description = ''The "system" crontab contents.'';
};