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:
parent
8e8554242f
commit
b75d15a9a8
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue