Parameterizes tests/common.nix and tests/default.nix on proxyServer (default "nginx"), giving flake.nix two nixosConfigurations (test-nginx/test-caddy) and `just build-vm [proxy]` a way to pick between them for interactive testing. The automated nixosTest now boots one node per proxy backend and runs the full assertion suite (factored into check_invoiceninja()) against each, so a regression in either nginx or caddy's config gets caught. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
30 lines
947 B
Nix
30 lines
947 B
Nix
{ proxyServer ? "nginx" }:
|
|
{ pkgs, modulesPath, ... }:
|
|
|
|
{
|
|
imports = [
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
(import ./common.nix { inherit proxyServer; })
|
|
];
|
|
|
|
# Required to build pkgs.chromium, which the module pulls in for PDF generation.
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# `nix flake check` evaluates config.system.build.toplevel directly, which asserts a real root
|
|
# filesystem and bootloader are configured. `just build-vm` builds config.system.build.vm
|
|
# instead, where the qemu-vm module overrides both of these with a tmpfs root and direct
|
|
# kernel boot (virtualisation.useBootLoader defaults to false) - so these values just need to
|
|
# satisfy the assertions and are otherwise unused.
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/nixos";
|
|
fsType = "ext4";
|
|
};
|
|
boot.loader.grub.enable = false;
|
|
|
|
users.users.root = {
|
|
initialPassword = "toor";
|
|
};
|
|
|
|
services.resolved.enable = true;
|
|
}
|