Added disnix service
svn path=/nixos/trunk/; revision=12283
This commit is contained in:
parent
6df19e0cbb
commit
82ddadc27c
@ -350,7 +350,9 @@ let
|
||||
inherit (pkgs) stdenv dbus;
|
||||
dbusServices =
|
||||
pkgs.lib.optional (config.services.hal.enable) pkgs.hal ++
|
||||
pkgs.lib.optional (config.services.avahi.enable) pkgs.avahi;
|
||||
pkgs.lib.optional (config.services.avahi.enable) pkgs.avahi ++
|
||||
pkgs.lib.optional (config.services.disnix.enable) pkgs.disnix
|
||||
;
|
||||
})
|
||||
|
||||
# HAL daemon.
|
||||
@ -401,6 +403,12 @@ let
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
# Disnix server
|
||||
++ optional config.services.disnix.enable
|
||||
(import ../upstart-jobs/disnix.nix {
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
# Handles the reboot/halt events.
|
||||
++ (map
|
||||
(event: makeJob (import ../upstart-jobs/halt.nix {
|
||||
|
24
upstart-jobs/disnix.nix
Normal file
24
upstart-jobs/disnix.nix
Normal file
@ -0,0 +1,24 @@
|
||||
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; ${pkgs.disnix}/bin/disnix-service'
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user