[nextcloud module] add wrapper example
Some checks failed
Check flake syntax / flake-check (push) Failing after 2m45s
Some checks failed
Check flake syntax / flake-check (push) Failing after 2m45s
This commit is contained in:
28
machines/modules/malobeo/microvm_client.nix
Normal file
28
machines/modules/malobeo/microvm_client.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{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";
|
||||
}];
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user