forked from fediversity/fediversity
		
	Following Fediversity/Fediversity#478 (comment), here is a PR that plugs the infra's `vmOptions` and `nixosConfigurations` outputs into flake checks, instead of calling random Nix commands from the CI. There is still a bit of magic in the CI, but that's because we don't have yet a Nix-aware CI that exposes one job per flake check. Reviewed-on: Fediversity/Fediversity#488 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>
		
			
				
	
	
		
			41 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  _class = "nixops4Resource";
 | 
						|
 | 
						|
  fediversityVm = {
 | 
						|
    name = "vm02116";
 | 
						|
    isFediversityVm = false;
 | 
						|
    vmId = 2116;
 | 
						|
    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";
 | 
						|
        };
 | 
						|
      };
 | 
						|
    };
 | 
						|
}
 |