Implement nixos-modules/static-page test
All checks were successful
CI / build (push) Successful in 2m40s
All checks were successful
CI / build (push) Successful in 2m40s
This commit is contained in:
parent
c3962b9738
commit
7930f9191d
10 changed files with 180 additions and 15 deletions
31
nixos-modules/static-page/test.nix
Normal file
31
nixos-modules/static-page/test.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue