Updated disnix service to work with latest revision

svn path=/nixos/trunk/; revision=16929
This commit is contained in:
Sander van der Burg 2009-09-02 10:27:44 +00:00
parent 486714bfcc
commit 484580dbbd

View File

@ -12,16 +12,6 @@ let
default = false;
description = "Whether to enable Disnix";
};
activateHook = mkOption {
default = "";
description = "Custom script or executable that activates services through Disnix";
};
deactivateHook = mkOption {
default = "";
description = "Custom script or executable that deactivates services through Disnix";
};
};
};
};
@ -41,7 +31,13 @@ let
start on dbus
stop on shutdown
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'
script
export ACTIVATION_SCRIPTS=${pkgs.disnix_activation_scripts}/libexec/disnix/activation-scripts
export PATH=${pkgs.nixUnstable}/bin
export HOME=/root
${pkgs.disnix}/bin/disnix-service
end script
'';
};
in
@ -53,6 +49,8 @@ mkIf cfg.enable {
options
];
environment.systemPackages = [ pkgs.disnix ];
services = {
extraJobs = [job];