28 lines
754 B
Nix
28 lines
754 B
Nix
{config, lib, pkgs, ...}:
|
|
let
|
|
cfg = config.services.malobeo.microvm.client;
|
|
in
|
|
{
|
|
options.services.malobeo.microvm.client = {
|
|
nextcloud = {
|
|
enable = lib.mkEnableOption "enable the nextcloud microvm wrapper";
|
|
datadir = lib.mkOption {
|
|
type = lib.types.string;
|
|
default = "/data/services/nextcloud/";
|
|
description = "set a custom datadir";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkMerge [
|
|
(lib.mkIf cfg.nextcloud.enable { #add check for run-vm?
|
|
services.malobeo.microvm.deployHosts = ["nextcloud"];
|
|
microvm.vms.nextcloud.config.microvm.shares = lib.mkAfter [{
|
|
source = cfg.datadir;
|
|
mountPoint = "/datadir";
|
|
tag = "nc-datadir";
|
|
proto = "virtiofs";
|
|
}];
|
|
})
|
|
];
|
|
} |