aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-25 10:49:38 -0300
committerEuAndreh <eu@euandre.org>2019-05-25 10:50:59 -0300
commit57e0bf303974d430d42c7b1f769c8bc708130dbc (patch)
tree76ae077cefb017a00735c18fa8b3fc02f821af22
parentTODOs.org (diff)
downloadtoph-57e0bf303974d430d42c7b1f769c8bc708130dbc.tar.gz
toph-57e0bf303974d430d42c7b1f769c8bc708130dbc.tar.xz
Test nixcloud-webservices
-rw-r--r--secrets/state.nixopsbin40982 -> 40982 bytes
-rw-r--r--servers/vps/vps.logical.nix28
-rw-r--r--servers/vps/vps.virtualbox.nix13
3 files changed, 27 insertions, 14 deletions
diff --git a/secrets/state.nixops b/secrets/state.nixops
index 94f1d2f..d97b27c 100644
--- a/secrets/state.nixops
+++ b/secrets/state.nixops
Binary files differ
diff --git a/servers/vps/vps.logical.nix b/servers/vps/vps.logical.nix
index a008eaf..9905cee 100644
--- a/servers/vps/vps.logical.nix
+++ b/servers/vps/vps.logical.nix
@@ -1,11 +1,25 @@
{
- network.description = "Web server";
+ network.description = "Personal VPS";
- webserver =
- { config, pkgs, ... }:
- { services.httpd.enable = true;
- services.httpd.adminAddr = "alice@example.org";
- services.httpd.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
- networking.firewall.allowedTCPPorts = [ 80 ];
+ webserver = { config, pkgs, ... }:
+ let
+ nixcloud = import (builtins.fetchTarball
+ "https://github.com/nixcloud/nixcloud-webservices/archive/master.tar.gz");
+ in {
+ imports = [ nixcloud ];
+ nixcloud.reverse-proxy = {
+ enable = true;
+ extendEtcHosts = true; # test without it
};
+
+ nixcloud.webservices.mediawiki.test1 = {
+ enable = true;
+
+ proxyOptions = {
+ port = 40000;
+ path = "/wiki";
+ domain = "example.com";
+ };
+ };
+ };
}
diff --git a/servers/vps/vps.virtualbox.nix b/servers/vps/vps.virtualbox.nix
index 651f54c..592862d 100644
--- a/servers/vps/vps.virtualbox.nix
+++ b/servers/vps/vps.virtualbox.nix
@@ -1,9 +1,8 @@
{
- webserver =
- { config, pkgs, ... }:
- { deployment.targetEnv = "virtualbox";
- deployment.virtualbox.memorySize = 1024; # megabytes
- deployment.virtualbox.vcpu = 2; # number of cpus
- deployment.virtualbox.headless = true;
- };
+ webserver = { config, pkgs, ... }: {
+ deployment.targetEnv = "virtualbox";
+ deployment.virtualbox.memorySize = 1024; # megabytes
+ deployment.virtualbox.vcpu = 2; # number of cpus
+ deployment.virtualbox.headless = true;
+ };
}