declare tests-service manually in config

This commit is contained in:
2025-05-30 19:27:25 -05:00
parent 41c3bb5a18
commit 8e3b362415
+8 -22
View File
@@ -1,16 +1,5 @@
{ config, lib, pkgs, meta, ... }:
let
testSiteIndex = pkgs.writeText "index.html" ''
<html>
<head><title>Hello</title></head>
<body>
<h1>Hello from test.roypository.com</h1>
<p>This content is defined in configuration.nix</p>
</body>
</html>
'';
in
{
imports = [ ];
@@ -71,18 +60,15 @@ in
enableACME = true;
acmeRoot = null;
};
};
virtualHosts."test.roypository.com" = {
forceSSL = true;
enableACME = true;
acmeRoot = null;
root = "${testSiteIndex}";
locations."/" = {
extraConfig =
''
index index.html;
'';
};
# Declare test service manually
services.tests-service = {
enable = true;
port = 8080;
nginx = {
enable = true;
hostname = "test.roypository.com";
};
};