mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-02 17:09:09 +03:00
Make the VirtualBox guest services depend on /dev/vboxguest
Systemd #ftw
This commit is contained in:
parent
b11c5d5991
commit
27f496c1ce
@ -41,7 +41,9 @@ if (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
|
|||||||
jobs.virtualbox =
|
jobs.virtualbox =
|
||||||
{ description = "VirtualBox service";
|
{ description = "VirtualBox service";
|
||||||
|
|
||||||
startOn = "started udev";
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
requires = [ "dev-vboxguest.device" ];
|
||||||
|
after = [ "dev-vboxguest.device" ];
|
||||||
|
|
||||||
exec = "${kernel.virtualboxGuestAdditions}/sbin/VBoxService --foreground";
|
exec = "${kernel.virtualboxGuestAdditions}/sbin/VBoxService --foreground";
|
||||||
};
|
};
|
||||||
@ -60,7 +62,7 @@ if (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
|
|||||||
''
|
''
|
||||||
InputDevice "VBoxMouse"
|
InputDevice "VBoxMouse"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.xserver.displayManager.sessionCommands =
|
services.xserver.displayManager.sessionCommands =
|
||||||
''
|
''
|
||||||
PATH=${makeSearchPath "bin" [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver ]}:$PATH \
|
PATH=${makeSearchPath "bin" [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver ]}:$PATH \
|
||||||
@ -72,9 +74,12 @@ if (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
|
|||||||
# /dev/vboxuser is necessary for VBoxClient to work. Maybe we
|
# /dev/vboxuser is necessary for VBoxClient to work. Maybe we
|
||||||
# should restrict this to logged-in users.
|
# should restrict this to logged-in users.
|
||||||
KERNEL=="vboxuser", OWNER="root", GROUP="root", MODE="0666"
|
KERNEL=="vboxuser", OWNER="root", GROUP="root", MODE="0666"
|
||||||
|
|
||||||
|
# Allow systemd dependencies on vboxguest.
|
||||||
|
KERNEL=="vboxguest", TAG+="systemd"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Make the ACPI Shutdown command to do the right thing.
|
# Make the ACPI Shutdown command to do the right thing.
|
||||||
services.acpid.enable = true;
|
services.acpid.enable = true;
|
||||||
services.acpid.powerEventCommands = "poweroff";
|
services.acpid.powerEventCommands = "poweroff";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user