-
Notifications
You must be signed in to change notification settings - Fork 26
/
default.nix
38 lines (38 loc) · 1.04 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ config, options, lib, mkUniqueUser, mkUniqueGroup, ... }:
{
config = lib.mkMerge [
{
directories.www = {
owner = mkUniqueUser config.webserver.user;
group = mkUniqueGroup config.webserver.group;
instance.before = [ "webserver-init.service" "instance-init.target" ];
postCreate = ''
cat > index.html <<EOF
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Nothing here yet?</title>
</head>
<body>
<h1>Nothing here yet?</h1>
<p>You can place files into
<code>${config.stateDir}/www</code>.</p>
</body>
</html>
EOF
'';
};
}
{
webserver.variant = "nginx";
tests.wanted = [ ./test.nix ];
}
];
meta = {
description = "Declarative nginx backend implementation for hacking";
maintainers = with lib.maintainers; [ qknight ];
license = lib.licenses.bsd2;
homepage = https://github.com/nixcloud/nixcloud-webservices;
};
}