nixos: freefall service: run ASAP

This commit is contained in:
Tobias Geerinckx-Rice 2015-08-03 18:27:57 +02:00
parent e4dd841310
commit c22c874aeb

View file

@ -39,11 +39,14 @@ with lib;
mkService = dev: mkService = dev:
assert dev != ""; assert dev != "";
let dev' = utils.escapeSystemdPath dev; in let dev' = utils.escapeSystemdPath dev; in
nameValuePair "freefall-${dev'}" nameValuePair "freefall-${dev'}" {
{ description = "Free-fall protection for ${dev}"; description = "Free-fall protection for ${dev}";
after = [ "${dev'}.device" ]; after = [ "${dev'}.device" ];
wantedBy = [ "${dev'}.device" ]; wantedBy = [ "${dev'}.device" ];
path = [ pkgs.freefall ]; path = [ pkgs.freefall ];
unitConfig = {
DefaultDependencies = false;
};
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.freefall}/bin/freefall ${dev}"; ExecStart = "${pkgs.freefall}/bin/freefall ${dev}";
Restart = "on-failure"; Restart = "on-failure";