You are going to have to build a custom image I think, maybe you can use the prebuilt, and resize it, look futher down the page here https://github.com/NixOS/nixops/blob/master/nix/virtualbox.nix#L132 . It looks like the main disk have to be on port 0. So if you would have virtualbox.disks.disk1 = { port=0; baseImage="${pkgs.richards-image}/image-name.vdi"; };
If you build a custom image, I think the command is something along: nix-build ~/nixpkgs-repo/nixos/release.nix -A config.system.build.virtualBoxImage -I nixos-config=path-to-nixos-config But the best is maybe to create a declaration for this, then you can look more into nixos/release.nix and modules ... virtualbox.nix. On Tue, Jun 16, 2015 at 9:12 PM, Richard Wallace < [email protected]> wrote: > Unfortunately, that just creates an additional disk and is not used as the > root partition or for the /nix/store. If I could figure out how to get it > used for either of those that option would work great, but I haven't been > able to do that yet. > > On Tue, Jun 16, 2015 at 12:06 PM, Joel Moberg <[email protected]> > wrote: > >> I don't use nixops but after looking in the repo i found this: >> https://github.com/NixOS/nixops/blob/master/nix/virtualbox.nix#L42 >> >> So it should be: virtualbox.disks.mydisk = { port=1; size=123123123; }; >> >> Hope this works. >> >> On Tue, Jun 16, 2015 at 8:56 PM, Richard Wallace < >> [email protected]> wrote: >> >>> Where should that be configured? In the examples in the manual < >>> https://nixos.org/nixops/manual/#idm140737319351408> I tried adding it >>> in trivial.nix as 'virtualbox.baseImageSize = "50G";' and tried adding it >>> to trivial-vbox.nix as 'deployment.virtualbox.baseImageSize = "50G";' and >>> neither seemed to have an affect. >>> >>> On Tue, Jun 16, 2015 at 11:25 AM, Joel Moberg <[email protected]> >>> wrote: >>> >>>> There is, config.virtualbox.baseImageSize, defined here: >>>> >>>> https://github.com/nixos/nixpkgs/blob/master/nixos/modules/virtualisation/vir >>>> tualbox-image.nix#L13 >>>> <https://github.com/nixos/nixpkgs/blob/master/nixos/modules/virtualisation/virtualbox-image.nix#L13> >>>> >>>> _______________________________________________ >>>> nix-dev mailing list >>>> [email protected] >>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev >>>> >>> >>> >> >
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
