forked from Fediversity/Fediversity
This PR contains a bunch of small fixes having to do with infra code. The goal is not to fix everything as that would require a full rewrite. Instead, we fix just what is necessary to get some testing going on. Once that is available, we will be able to work on a full refactor with more guarantees. Something of note is that most of the difficulty was to find code that would make both `nixops4 apply` _and_ `nix build .#nixosConfigurations.<machine>` happy. The takeaway is that the tests that we are adding now will not catch a whole class of tests having to do with how NixOps4 wires up the resources. Still, this is probably less significant as we are supposed to use NixOps4 every now and then. The commits should be read separately. Reviewed-on: Fediversity/Fediversity#478 Reviewed-by: kiara Grouwstra <kiara@procolix.eu> Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com> Co-committed-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{
|
|
_class = "nixops4Resource";
|
|
|
|
fediversityVm = {
|
|
vmId = 2116;
|
|
proxmox = "procolix";
|
|
description = "Forgejo";
|
|
|
|
ipv4.address = "185.206.232.34";
|
|
ipv6.address = "2a00:51c0:12:1201::20";
|
|
};
|
|
|
|
nixos.module =
|
|
{ lib, ... }:
|
|
{
|
|
imports = [
|
|
./forgejo.nix
|
|
];
|
|
|
|
## vm02116 is running on old hardware based on a Xen VM environment, so it
|
|
## needs these extra options. Once the VM gets moved to a newer node, these
|
|
## two options can safely be removed.
|
|
boot.initrd.availableKernelModules = [ "xen_blkfront" ];
|
|
services.xe-guest-utilities.enable = true;
|
|
|
|
## NOTE: This VM was created manually, which requires us to override the
|
|
## default disko-based `fileSystems` definition.
|
|
fileSystems = lib.mkForce {
|
|
"/" = {
|
|
device = "/dev/disk/by-uuid/3802a66d-e31a-4650-86f3-b51b11918853";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
"/boot" = {
|
|
device = "/dev/disk/by-uuid/2CE2-1173";
|
|
fsType = "vfat";
|
|
};
|
|
};
|
|
};
|
|
}
|