mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
virtualbox: Unbreak the nixos module.
This commit is contained in:
parent
8b512261be
commit
65393ca8d3
@ -16,7 +16,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.services.virtualboxHost.enable {
|
config = mkIf config.services.virtualboxHost.enable (mkMerge [{
|
||||||
boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ];
|
boot.kernelModules = [ "vboxdrv" "vboxnetadp" "vboxnetflt" ];
|
||||||
boot.extraModulePackages = [ virtualbox ];
|
boot.extraModulePackages = [ virtualbox ];
|
||||||
environment.systemPackages = [ virtualbox ];
|
environment.systemPackages = [ virtualbox ];
|
||||||
@ -51,7 +51,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# Since we lack the right setuid binaries, set up a host-only network by default.
|
# Since we lack the right setuid binaries, set up a host-only network by default.
|
||||||
} // mkIf config.services.virtualboxHost.addNetworkInterface {
|
} (mkIf config.services.virtualboxHost.addNetworkInterface {
|
||||||
systemd.services."vboxnet0" =
|
systemd.services."vboxnet0" =
|
||||||
{ description = "VirtualBox vboxnet0 Interface";
|
{ description = "VirtualBox vboxnet0 Interface";
|
||||||
requires = [ "dev-vboxnetctl.device" ];
|
requires = [ "dev-vboxnetctl.device" ];
|
||||||
@ -73,5 +73,5 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.interfaces.vboxnet0.ip4 = [ { address = "192.168.56.1"; prefixLength = 24; } ];
|
networking.interfaces.vboxnet0.ip4 = [ { address = "192.168.56.1"; prefixLength = 24; } ];
|
||||||
};
|
})]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user