added option to specify which packages are available to the system incrontab
recommendation by @jtojnar and @maurer
This commit is contained in:
parent
3d1091eb5b
commit
d9943e6bba
|
@ -53,6 +53,13 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraPackages = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
default = [];
|
||||||
|
example = "[ pkgs.rsync ];";
|
||||||
|
description = "Extra packages available to the system incrontab.";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -84,7 +91,7 @@ in
|
||||||
systemd.services.incron = {
|
systemd.services.incron = {
|
||||||
description = "File system events scheduler";
|
description = "File system events scheduler";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = [ config.system.path ];
|
path = cfg.extraPackages;
|
||||||
preStart = "mkdir -m 710 -p /var/spool/incron";
|
preStart = "mkdir -m 710 -p /var/spool/incron";
|
||||||
serviceConfig.Type = "forking";
|
serviceConfig.Type = "forking";
|
||||||
serviceConfig.PIDFile = "/run/incrond.pid";
|
serviceConfig.PIDFile = "/run/incrond.pid";
|
||||||
|
|
Loading…
Reference in New Issue