Updated disnix service to work with latest revision
svn path=/nixos/trunk/; revision=16929
This commit is contained in:
parent
486714bfcc
commit
484580dbbd
@ -4,24 +4,14 @@
|
|||||||
###### interface
|
###### interface
|
||||||
let
|
let
|
||||||
inherit (pkgs.lib) mkOption;
|
inherit (pkgs.lib) mkOption;
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services = {
|
services = {
|
||||||
disnix = {
|
disnix = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable Disnix";
|
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";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -40,8 +30,14 @@ let
|
|||||||
|
|
||||||
start on dbus
|
start on dbus
|
||||||
stop on shutdown
|
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
|
in
|
||||||
@ -52,13 +48,15 @@ mkIf cfg.enable {
|
|||||||
#../upstart-jobs/dbus.nix # services.dbus.*
|
#../upstart-jobs/dbus.nix # services.dbus.*
|
||||||
options
|
options
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.disnix ];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
extraJobs = [job];
|
extraJobs = [job];
|
||||||
|
|
||||||
dbus = {
|
dbus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
packages = [pkgs.disnix];
|
packages = [ pkgs.disnix ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user