Move Garage VM stuff out of main file
This commit is contained in:
parent
050042d255
commit
042cb2d517
|
@ -134,20 +134,6 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf config.fediversity.enable {
|
||||
# virtualisation.diskSize = 2048;
|
||||
# virtualisation.forwardPorts = [
|
||||
# {
|
||||
# from = "host";
|
||||
# host.port = fedicfg.rpc.port;
|
||||
# guest.port = fedicfg.rpc.port;
|
||||
# }
|
||||
# {
|
||||
# from = "host";
|
||||
# host.port = fedicfg.web.port;
|
||||
# guest.port = fedicfg.web.port;
|
||||
# }
|
||||
# ];
|
||||
|
||||
environment.systemPackages = [ pkgs.minio-client pkgs.awscli ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
## VM-specific modules
|
||||
interactive-vm = import ./vm/interactive-vm.nix;
|
||||
garage-vm = import ./vm/garage-vm.nix;
|
||||
mastodon-vm = import ./vm/mastodon-vm.nix;
|
||||
peertube-vm = import ./vm/peertube-vm.nix;
|
||||
pixelfed-vm = import ./vm/pixelfed-vm.nix;
|
||||
|
@ -25,17 +26,17 @@
|
|||
nixosConfigurations = {
|
||||
mastodon = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = with self.nixosModules; [ fediversity interactive-vm mastodon-vm ];
|
||||
modules = with self.nixosModules; [ fediversity interactive-vm garage-vm mastodon-vm ];
|
||||
};
|
||||
|
||||
peertube = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = with self.nixosModules; [ fediversity interactive-vm peertube-vm ];
|
||||
modules = with self.nixosModules; [ fediversity interactive-vm garage-vm peertube-vm ];
|
||||
};
|
||||
|
||||
pixelfed = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = with self.nixosModules; [ fediversity interactive-vm pixelfed-vm ];
|
||||
modules = with self.nixosModules; [ fediversity interactive-vm garage-vm pixelfed-vm ];
|
||||
};
|
||||
|
||||
all = nixpkgs.lib.nixosSystem {
|
||||
|
@ -43,6 +44,7 @@
|
|||
modules = with self.nixosModules; [
|
||||
fediversity
|
||||
interactive-vm
|
||||
garage-vm
|
||||
peertube-vm
|
||||
pixelfed-vm
|
||||
mastodon-vm
|
||||
|
|
|
@ -37,7 +37,7 @@ pkgs.nixosTest {
|
|||
nodes = {
|
||||
server = { config, ... }: {
|
||||
virtualisation.memorySize = lib.mkVMOverride 4096;
|
||||
imports = with self.nixosModules; [ mastodon-vm ];
|
||||
imports = with self.nixosModules; [ garage-vm mastodon-vm ];
|
||||
# TODO: pair down
|
||||
environment.systemPackages = with pkgs; [
|
||||
python3
|
||||
|
|
|
@ -136,7 +136,7 @@ pkgs.nixosTest {
|
|||
memorySize = lib.mkVMOverride 8192;
|
||||
cores = 8;
|
||||
};
|
||||
imports = with self.nixosModules; [ pixelfed-vm ];
|
||||
imports = with self.nixosModules; [ garage-vm pixelfed-vm ];
|
||||
# TODO: pair down
|
||||
environment.systemPackages = with pkgs; [
|
||||
python3
|
||||
|
|
25
vm/garage-vm.nix
Normal file
25
vm/garage-vm.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, modulesPath, ... }:
|
||||
|
||||
let
|
||||
fedicfg = config.fediversity.internal.garage;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../fediversity
|
||||
(modulesPath + "/virtualisation/qemu-vm.nix")
|
||||
];
|
||||
|
||||
virtualisation.diskSize = 2048;
|
||||
virtualisation.forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = fedicfg.rpc.port;
|
||||
guest.port = fedicfg.rpc.port;
|
||||
}
|
||||
{
|
||||
from = "host";
|
||||
host.port = fedicfg.web.port;
|
||||
guest.port = fedicfg.web.port;
|
||||
}
|
||||
];
|
||||
}
|
Reference in a new issue