|
96 | 96 | # Allow the user to login as root without password. |
97 | 97 | users.extraUsers.root.initialHashedPassword = ""; |
98 | 98 |
|
| 99 | + # see https://wiki.qemu.org/Documentation/9psetup#Performance_Considerations |
| 100 | + # == 100M |
| 101 | + # FIXME? currently 500K seems to be the limit? |
| 102 | + virtualisation.msize = mkVMDefault 104857600; |
| 103 | + |
99 | 104 | services = let |
100 | 105 | service = if lib.versionAtLeast (lib.versions.majorMinor lib.version) "20.09" then "getty" else "mingetty"; |
101 | 106 | in { |
@@ -132,15 +137,15 @@ in { |
132 | 137 | boot.initrd.postMountCommands = |
133 | 138 | (lib.optionalString cfg.mounts.mountHome '' |
134 | 139 | mkdir -p $targetRoot/home/ |
135 | | - mount -t 9p home $targetRoot/home/ -o trans=virtio,version=9p2000.L,cache=${cfg.mounts.cache} |
| 140 | + mount -t 9p home $targetRoot/home/ -o trans=virtio,version=9p2000.L,cache=${cfg.mounts.cache},msize=${toString config.virtualisation.msize} |
136 | 141 | '') + |
137 | 142 | (lib.optionalString (user != "" && cfg.mounts.mountNixProfile) '' |
138 | 143 | mkdir -p $targetRoot/nix/var/nix/profiles/per-user/${user}/profile/ |
139 | | - mount -t 9p nixprofile $targetRoot/nix/var/nix/profiles/per-user/${user}/profile/ -o trans=virtio,version=9p2000.L,cache=${cfg.mounts.cache} |
| 144 | + mount -t 9p nixprofile $targetRoot/nix/var/nix/profiles/per-user/${user}/profile/ -o trans=virtio,version=9p2000.L,cache=${cfg.mounts.cache},msize=${toString config.virtualisation.msize} |
140 | 145 | '') + |
141 | 146 | builtins.concatStringsSep " " (lib.mapAttrsToList (target: mount: '' |
142 | 147 | mkdir -p $targetRoot/${target} |
143 | | - mount -t 9p ${mount.tag} $targetRoot/${target} -o trans=virtio,version=9p2000.L,cache=${mount.cache} |
| 148 | + mount -t 9p ${mount.tag} $targetRoot/${target} -o trans=virtio,version=9p2000.L,cache=${mount.cache},msize=${toString config.virtualisation.msize} |
144 | 149 | '') cfg.mounts.extraMounts); |
145 | 150 |
|
146 | 151 | environment = { |
|
0 commit comments