Added disnix hook options

svn path=/nixos/trunk/; revision=12596
This commit is contained in:
Sander van der Burg 2008-08-12 13:16:12 +00:00
parent 4c3627f16e
commit c5fea583e2
2 changed files with 11 additions and 1 deletions

View File

@ -1534,6 +1534,16 @@ in
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";
};
};
httpd = {

View File

@ -19,6 +19,6 @@ in
sleep 3
end script
respawn ${pkgs.bash}/bin/sh -c 'export PATH=/var/run/current-system/sw/bin:$PATH; export HOME=/root; ${pkgs.disnix}/bin/disnix-service'
respawn ${pkgs.bash}/bin/sh -c 'export PATH=/var/run/current-system/sw/bin:$PATH; export HOME=/root; export DISNIX_ACTIVATE=${cfg.activateHook}; export DISNIX_DEACTIVATE_HOOK=${cfg.deactivateHook}; ${pkgs.disnix}/bin/disnix-service'
'';
}