diff --git a/nixos/machines/default.nix b/nixos/machines/default.nix index e654980..6b85972 100644 --- a/nixos/machines/default.nix +++ b/nixos/machines/default.nix @@ -81,7 +81,7 @@ type = "virtual"; hypervisorName = "lewis"; - nixosModule = { pkgs, lib, ... }: { + nixosModule = { pkgs, lib, config, ... }: { lab.vm = { id = 1; staticNetworking = true; @@ -89,6 +89,14 @@ staticIPv6 = "2a0d:6e00:1a77:30::42"; }; + microvm.shares = [{ + source = "/var/lib/microvms/${config.networking.hostName}/shares/docker_swarm"; + mountPoint = "/var/lib/docker/swarm"; + tag = "docker_swarm"; + proto = "virtiofs"; + socket = "docker_swarm.sock"; + }]; + networking = { nftables.enable = lib.mkForce false; firewall.enable = lib.mkForce false; @@ -112,9 +120,17 @@ type = "virtual"; hypervisorName = "lewis"; - nixosModule = { pkgs, lib, ... }: { + nixosModule = { pkgs, lib, config, ... }: { lab.vm.id = 2; + microvm.shares = [{ + source = "/var/lib/microvms/${config.networking.hostName}/shares/docker_swarm"; + mountPoint = "/var/lib/docker/swarm"; + tag = "docker_swarm"; + proto = "virtiofs"; + socket = "docker_swarm.sock"; + }]; + networking = { nftables.enable = lib.mkForce false; firewall.enable = lib.mkForce false;