fix automount app in nextcloud vm

This commit is contained in:
Jonas Heinrich 2023-10-26 15:41:10 +02:00
parent dff137dff0
commit ce1103dca8
2 changed files with 30 additions and 25 deletions

@ -1 +1 @@
Subproject commit c5c3d62e988cd33c1f9119f07b551961bfeff3f6 Subproject commit 56467f051c18b638b134335973f4cd2ab4f90927

View file

@ -104,23 +104,41 @@
]; ];
}; };
}; };
# Mount our local development repositories into the VM
nixos-shell.mounts.extraMounts = { nixos-shell.mounts.extraMounts = {
"/var/lib/nextcloud/calendar" = { "/var/lib/nextcloud/calendar" = {
target = ./calendar; target = ./calendar;
cache = "none"; cache = "none";
}; };
}; };
#"/var/lib/nextcloud/server" = {
# target = ./server; systemd.mounts = [
# cache = "none"; {
#}; what = "/var/lib/nextcloud/calendar";
#}; where = "/var/lib/nextcloud/store-apps/calendar";
# "/var/lib/nextcloud/server/3rdparty/sabre/dav" = { type = "fuse.bindfs";
# target = ./dav; options = "uid=997,gid=997";
# cache = "none"; wantedBy = [ "multi-user.target" ];
# }; enable = true;
#services.nginx.virtualHosts."localhost".root = lib.mkForce "/var/lib/nextcloud/server"; }
];
systemd.services."prepare-bindfs-mount" = {
script = ''
set -eu
${pkgs.coreutils}/bin/mkdir -p /var/lib/nextcloud/store-apps
${pkgs.coreutils}/bin/chown nextcloud:nextcloud /var/lib/nextcloud/store-apps
'';
before = [
"nextcloud-setup.service"
"var-lib-nextcloud-store\\x2dapps-calendar.mount"
];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "oneshot";
User = "root";
};
};
# Setup mail server # Setup mail server
services.maddy = { services.maddy = {
@ -163,19 +181,6 @@
}; };
}; };
# FIXME: need to create /var/lib/nextcloud/store-apps before
# with correct permissions
systemd.mounts = [
{
what = "/var/lib/nextcloud/calendar";
where = "/var/lib/nextcloud/store-apps/calendar";
type = "fuse.bindfs";
options = "uid=997,gid=997";
wantedBy = [ "multi-user.target" ];
enable = true;
}
];
system.fsPackages = [ pkgs.bindfs ]; system.fsPackages = [ pkgs.bindfs ];
system.stateVersion = "23.05"; system.stateVersion = "23.05";