nixos/vbox: Move all options to virtualisation.*.
Commit 687caeb
renamed services.virtualboxHost to programs.virtualbox,
but according to the discussion on the commit, it's probably a better to
put it into virtualisation.virtualbox instead.
The discussion can be found here:
https://github.com/NixOS/nixpkgs/commit/687caeb#commitcomment-12664978
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
f741d426da
commit
6440e9bbfd
@ -92,6 +92,17 @@ was accordingly renamed to <literal>electron</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
The VirtualBox host and guest options have been moved/renamed more
|
||||
consistently and less confusing to be now found in
|
||||
<literal>virtualisation.virtualbox.host.*</literal> instead of
|
||||
<literal>services.virtualboxHost.*</literal> and
|
||||
<literal>virtualisation.virtualbox.guest.*</literal> instead of
|
||||
<literal>services.virtualboxGuest.*</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Haskell packages can no longer be found by name, i.e. the commands
|
||||
|
@ -109,7 +109,14 @@ in zipModules ([]
|
||||
++ obsolete [ "services" "xserver" "startOpenSSHAgent" ] [ "programs" "ssh" "startAgent" ]
|
||||
|
||||
# VirtualBox
|
||||
++ obsolete [ "services" "virtualbox" "enable" ] [ "services" "virtualboxGuest" "enable" ]
|
||||
++ obsolete [ "services" "virtualbox" "enable" ] [ "virtualisation" "virtualbox" "guest" "enable" ]
|
||||
++ obsolete [ "services" "virtualboxGuest" "enable" ] [ "virtualisation" "virtualbox" "guest" "enable" ]
|
||||
++ obsolete [ "programs" "virtualbox" "enable" ] [ "virtualisation" "virtualbox" "host" "enable" ]
|
||||
++ obsolete [ "programs" "virtualbox" "addNetworkInterface" ] [ "virtualisation" "virtualbox" "host" "addNetworkInterface" ]
|
||||
++ obsolete [ "programs" "virtualbox" "enableHardening" ] [ "virtualisation" "virtualbox" "host" "enableHardening" ]
|
||||
++ obsolete [ "services" "virtualboxHost" "enable" ] [ "virtualisation" "virtualbox" "host" "enable" ]
|
||||
++ obsolete [ "services" "virtualboxHost" "addNetworkInterface" ] [ "virtualisation" "virtualbox" "host" "addNetworkInterface" ]
|
||||
++ obsolete [ "services" "virtualboxHost" "enableHardening" ] [ "virtualisation" "virtualbox" "host" "enableHardening" ]
|
||||
|
||||
# Tarsnap
|
||||
++ obsolete [ "services" "tarsnap" "config" ] [ "services" "tarsnap" "archives" ]
|
||||
@ -144,8 +151,6 @@ in zipModules ([]
|
||||
# DNSCrypt-proxy
|
||||
++ obsolete [ "services" "dnscrypt-proxy" "port" ] [ "services" "dnscrypt-proxy" "localPort" ]
|
||||
|
||||
++ obsolete [ "services" "virtualboxHost" ] [ "programs" "virtualbox" ]
|
||||
|
||||
# Options that are obsolete and have no replacement.
|
||||
++ obsolete' [ "boot" "loader" "grub" "bootDevice" ]
|
||||
++ obsolete' [ "boot" "initrd" "luks" "enable" ]
|
||||
|
@ -6,7 +6,7 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.virtualboxGuest;
|
||||
cfg = config.virtualisation.virtualbox.guest;
|
||||
kernel = config.boot.kernelPackages;
|
||||
|
||||
in
|
||||
@ -15,20 +15,11 @@ in
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.virtualboxGuest = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the VirtualBox service and other guest additions.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
options.virtualisation.virtualbox.guest.enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the VirtualBox service and other guest additions.";
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -3,7 +3,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.virtualbox;
|
||||
cfg = config.virtualisation.virtualbox.host;
|
||||
virtualbox = config.boot.kernelPackages.virtualbox.override {
|
||||
inherit (cfg) enableHardening;
|
||||
};
|
||||
@ -11,7 +11,7 @@ let
|
||||
in
|
||||
|
||||
{
|
||||
options.programs.virtualbox = {
|
||||
options.virtualisation.virtualbox.host = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -31,7 +31,7 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
||||
fsType = "vboxsf";
|
||||
};
|
||||
|
||||
services.virtualboxGuest.enable = true;
|
||||
virtualisation.virtualbox.guest.enable = true;
|
||||
|
||||
boot.initrd.kernelModules = [
|
||||
"af_packet" "vboxsf"
|
||||
@ -308,9 +308,9 @@ in {
|
||||
vmConfigs = mapAttrsToList mkVMConf vboxVMs;
|
||||
in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs;
|
||||
virtualisation.memorySize = 768;
|
||||
services.virtualboxHost.enable = true;
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
users.extraUsers.alice.extraGroups = let
|
||||
inherit (config.services.virtualboxHost) enableHardening;
|
||||
inherit (config.virtualisation.virtualbox.host) enableHardening;
|
||||
in lib.mkIf enableHardening (lib.singleton "vboxusers");
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user