Get Pixelfed running on metal #24

Merged
taeer merged 26 commits from pixelfed-on-metal into main 2024-09-26 15:52:16 +02:00
5 changed files with 33 additions and 20 deletions
Showing only changes of commit 042cb2d517 - Show all commits

View file

@ -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 = [

View file

@ -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

View file

@ -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

View file

@ -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
View 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;
}
];
}