Nextcloud improvements part 1 #81
Reference in New Issue
Block a user
Delete Branch "nextcloud-issue-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For now this fixes #67 and parts of #69 (nice)
Warning: I have not tested
e94410ca54yetThe problem is that nextcloud runs inside microvm. so its /data dir will actually be a tmpfs. We need to share the hosts /data. for example as its done with /var right now in host_builder.nix
I currently see to possible solutions: either we only put the nextclouds data on storage, or we put all microvms /var on storage. that way current and future vms would not bloat fannys root drive. But it would be important to make this configurable, maybe even on the host because microvms that run on hetzner need to mount the /var dir as it is right now (there is no /data dir).
Maybe for simplicity we just go with the first option for now and implement something more sophisticated later on.
What do you think about a wrapper module like
options.malobeo.microvm.nextcloudthat enables the necessary options like a (configurable) share?My idea is something like this
edddfc5e3fbut that doesn't work because of the imperative microvm workflow:This is actually a bit more complicated than expected. As you mentioned we cannot mix up declarative/imperative microvms. From the host side we cannot change the microvm shares at all. So a working approach would be add a share like that to all microvms (or only nextcloud for now):
And then on the host side we could just mount storage (or an extra dataset for that usecase) on
/var/lib/microvms/dataif we want. That way we can deploy microvms to any host we want, no matter if they have additional storage or not, and if they do just mount the storage to the data dir.Another, way more simple approach would be to just create a microvm dataset on the storage pool and mount that to
/var/lib/microvmson fanny. that way just all microvms data will live on storage without any changes neccesary to our vm implementations.When setting
malobeo.disks.encryption = false;(and setting reservation = 0G; but i think thats just cause my host has nearly no diskspace right now) iam able to run fanny withnix run .\#nixosConfigurations.fanny.config.system.build.vmWithDiskoand it looks good. Sadly the microvms fail to boot (due to vmvariant issues i think) but iam confident the virtiofs mount should work without testing.I think this can be merged.
I've tested the configuration but the data mount doesn't show up.
[malobeo@fanny:~]$ cat /nix/store/1wfvgdzxm3fxcxm6i8vlpdw012137rzv-durruti-virtiofsd-supervisord.conf