fix automount app in nextcloud vm
This commit is contained in:
parent
dff137dff0
commit
ce1103dca8
2 changed files with 30 additions and 25 deletions
2
calendar
2
calendar
|
|
@ -1 +1 @@
|
|||
Subproject commit c5c3d62e988cd33c1f9119f07b551961bfeff3f6
|
||||
Subproject commit 56467f051c18b638b134335973f4cd2ab4f90927
|
||||
|
|
@ -104,23 +104,41 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
# Mount our local development repositories into the VM
|
||||
|
||||
nixos-shell.mounts.extraMounts = {
|
||||
"/var/lib/nextcloud/calendar" = {
|
||||
target = ./calendar;
|
||||
cache = "none";
|
||||
};
|
||||
};
|
||||
#"/var/lib/nextcloud/server" = {
|
||||
# target = ./server;
|
||||
# cache = "none";
|
||||
#};
|
||||
#};
|
||||
# "/var/lib/nextcloud/server/3rdparty/sabre/dav" = {
|
||||
# target = ./dav;
|
||||
# cache = "none";
|
||||
# };
|
||||
#services.nginx.virtualHosts."localhost".root = lib.mkForce "/var/lib/nextcloud/server";
|
||||
|
||||
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;
|
||||
}
|
||||
];
|
||||
|
||||
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
|
||||
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.stateVersion = "23.05";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue