Implement nixos-modules/static-page test
All checks were successful
CI / build (push) Successful in 2m40s

This commit is contained in:
Fabian Hauser 2025-03-24 14:17:53 +02:00
parent c3962b9738
commit 7930f9191d
10 changed files with 180 additions and 15 deletions

View file

@ -0,0 +1,31 @@
{
...
}:
{
# Note: This extends the default configuration from ${self}/checks/nixos-modules
nodes.webserver =
{ pkgs, lib, ... }:
let
inherit (pkgs) curl gnugrep;
inherit (lib) mkForce genAttrs const;
in
{
# Setup simple localhost page with an example.com redirect
qois.static-page = {
enable = true;
pages."localhost".domainAliases = [ "example.com" ];
};
# Disable TLS services
services.nginx.virtualHosts = genAttrs [ "localhost" "example.com" ] (const {
forceSSL = mkForce false;
enableACME = mkForce false;
});
# Test environment
environment.systemPackages = [
curl
gnugrep
];
};
}