declare tests-service manually in config
This commit is contained in:
+8
-22
@@ -1,16 +1,5 @@
|
|||||||
{ config, lib, pkgs, meta, ... }:
|
{ 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 = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
@@ -71,18 +60,15 @@ in
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
acmeRoot = null;
|
acmeRoot = null;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
virtualHosts."test.roypository.com" = {
|
# Declare test service manually
|
||||||
forceSSL = true;
|
services.tests-service = {
|
||||||
enableACME = true;
|
enable = true;
|
||||||
acmeRoot = null;
|
port = 8080;
|
||||||
root = "${testSiteIndex}";
|
nginx = {
|
||||||
locations."/" = {
|
enable = true;
|
||||||
extraConfig =
|
hostname = "test.roypository.com";
|
||||||
''
|
|
||||||
index index.html;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user