2008-07-06 19:34:19 +01:00
|
|
|
args: with args;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.disnix;
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "disnix";
|
2008-07-23 15:13:27 +01:00
|
|
|
|
2008-07-06 19:34:19 +01:00
|
|
|
job = ''
|
|
|
|
description "Disnix server"
|
|
|
|
|
|
|
|
start on dbus
|
2008-07-23 15:13:27 +01:00
|
|
|
stop on shutdown
|
2008-07-06 19:34:19 +01:00
|
|
|
|
2008-08-13 10:44:40 +01:00
|
|
|
respawn ${pkgs.bash}/bin/sh -c 'export PATH=/var/run/current-system/sw/bin:$PATH; export HOME=/root; export DISNIX_ACTIVATE_HOOK=${cfg.activateHook}; export DISNIX_DEACTIVATE_HOOK=${cfg.deactivateHook}; ${pkgs.disnix}/bin/disnix-service'
|
2008-07-06 19:34:19 +01:00
|
|
|
'';
|
|
|
|
}
|