3
0
Fork 0
forked from mirrors/nixpkgs

virtualisation: add option to switch off readonly host fs in vm

svn path=/nixos/trunk/; revision=21126
This commit is contained in:
Rob Vermaas 2010-04-16 15:09:47 +00:00
parent 8e8554242f
commit b75d15a9a8
2 changed files with 11 additions and 1 deletions

View file

@ -145,6 +145,7 @@ rec {
{ config, pkgs, ... }:
{
virtualisation.memorySize = 1024;
virtualisation.readonlyHostFS = false;
services.xserver.enable = true;
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.auto.enable = true;

View file

@ -60,6 +60,15 @@ let
'';
};
virtualisation.readonlyHostFS =
mkOption {
default = true;
description =
''
Whether to mount the hostfs read-only.
'';
};
};
cfg = config.virtualisation;
@ -163,7 +172,7 @@ in
{ mountPoint = "/hostfs";
device = "//10.0.2.4/qemu";
fsType = "cifs";
options = "guest,username=nobody,noperm";
options = "guest,username=nobody${if config.virtualisation.readonlyHostFS then ",noperm" else ""}";
neededForBoot = true;
}
{ mountPoint = "/nix/store";