forked from kalipso/infrastructure
[run-vim] allow setting data share
This commit is contained in:
@@ -133,6 +133,13 @@ rec {
|
||||
mountPoint = "/var";
|
||||
tag = "var";
|
||||
}
|
||||
] ++ pkgs.lib.optionals (options.dataPath != "") [
|
||||
{
|
||||
source = "${options.dataPath}";
|
||||
securityModel = "mapped";
|
||||
mountPoint = "/data";
|
||||
tag = "data";
|
||||
}
|
||||
]);
|
||||
|
||||
interfaces = pkgs.lib.mkIf (!options.withNetworking) (pkgs.lib.mkForce [{
|
||||
@@ -209,6 +216,7 @@ rec {
|
||||
(vmMicroVMOverwrites name {
|
||||
withNetworking = true;
|
||||
varPath = "";
|
||||
dataPath = "";
|
||||
writableStore = false; })
|
||||
(if sopsDummy then (vmSopsOverwrites name) else {})
|
||||
]);
|
||||
@@ -218,11 +226,12 @@ rec {
|
||||
builtins.listToAttrs (map mapperFunc self.nixosConfigurations.${host}.config.services.malobeo.microvm.deployHosts));
|
||||
};
|
||||
|
||||
buildVM = host: networking: sopsDummy: disableDisko: varPath: writableStore: fwdPort: (self.nixosConfigurations.${host}.extendModules {
|
||||
buildVM = host: networking: sopsDummy: disableDisko: varPath: dataPath: writableStore: fwdPort: (self.nixosConfigurations.${host}.extendModules {
|
||||
modules = [
|
||||
(vmMicroVMOverwrites host {
|
||||
withNetworking = networking;
|
||||
varPath = "${varPath}";
|
||||
dataPath = "${dataPath}";
|
||||
writableStore = writableStore;
|
||||
fwdPort = fwdPort; })
|
||||
(if sopsDummy then (vmSopsOverwrites host) else {})
|
||||
|
||||
Reference in New Issue
Block a user