Files
infrastructure/machines/modules/malobeo/microvm_client.nix
ahtlon edddfc5e3f
Some checks failed
Check flake syntax / flake-check (push) Failing after 2m45s
[nextcloud module] add wrapper example
2025-01-29 11:20:12 +01:00

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";
}];
})
];
}