mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
fdc362a726
svn path=/nixos/trunk/; revision=12611
25 lines
560 B
Nix
25 lines
560 B
Nix
args: with args;
|
|
|
|
let
|
|
|
|
cfg = config.services.disnix;
|
|
|
|
in
|
|
{
|
|
name = "disnix";
|
|
|
|
job = ''
|
|
description "Disnix server"
|
|
|
|
start on dbus
|
|
stop on shutdown
|
|
|
|
start script
|
|
# !!! quick hack: wait until dbus has started
|
|
sleep 3
|
|
end script
|
|
|
|
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'
|
|
'';
|
|
}
|