summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-01-10 15:30:45 +0100
committerlassulus <lassulus@lassul.us>2018-01-10 15:30:45 +0100
commit42e1d088367412b3f2a340a242285c5734508735 (patch)
tree98b39d306d6ba825f03540a3f406374b4a5d769b
parent794e4fe21b9d0841f80ecab184716fbf88328aed (diff)
parentcc51c5f7db21749b87b0db096087b7e7447a8f0a (diff)
Merge remote-tracking branch 'gum/master'
-rw-r--r--krebs/3modules/makefu/default.nix1
-rw-r--r--krebs/5pkgs/simple/internetarchive/default.nix2
-rw-r--r--makefu/1systems/gum/config.nix2
-rw-r--r--makefu/2configs/deployment/photostore.krebsco.de.nix40
-rw-r--r--makefu/5pkgs/cameraupload-server/default.nix23
5 files changed, 66 insertions, 2 deletions
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index 9f1842b88..56e5c6b82 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -541,6 +541,7 @@ with import <stockholm/lib>;
graph IN A ${nets.internet.ip4.addr}
ghook IN A ${nets.internet.ip4.addr}
dockerhub IN A ${nets.internet.ip4.addr}
+ photostore IN A ${nets.internet.ip4.addr}
io IN NS gum.krebsco.de.
'';
};
diff --git a/krebs/5pkgs/simple/internetarchive/default.nix b/krebs/5pkgs/simple/internetarchive/default.nix
index 2f55e6f42..3c83093be 100644
--- a/krebs/5pkgs/simple/internetarchive/default.nix
+++ b/krebs/5pkgs/simple/internetarchive/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, fetchPypi, ... }:
+{ stdenv, pkgs, ... }:
with pkgs.python3Packages;
buildPythonPackage rec {
pname = "internetarchive";
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index 6e5f3c2d4..f473d9e4c 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -67,7 +67,7 @@ in {
<stockholm/makefu/2configs/nginx/public_html.nix>
<stockholm/makefu/2configs/nginx/update.connector.one.nix>
- <stockholm/makefu/2configs/deployment/mycube.connector.one.nix>
+ <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
<stockholm/makefu/2configs/deployment/graphs.nix>
<stockholm/makefu/2configs/deployment/owncloud.nix>
<stockholm/makefu/2configs/deployment/boot-euer.nix>
diff --git a/makefu/2configs/deployment/photostore.krebsco.de.nix b/makefu/2configs/deployment/photostore.krebsco.de.nix
new file mode 100644
index 000000000..9e16a384a
--- /dev/null
+++ b/makefu/2configs/deployment/photostore.krebsco.de.nix
@@ -0,0 +1,40 @@
+{ config, lib, pkgs, ... }:
+# more than just nginx config but not enough to become a module
+with import <stockholm/lib>;
+let
+ wsgi-sock = "${workdir}/uwsgi-photostore.sock";
+ workdir = config.services.uwsgi.runDir;
+in {
+
+ services.uwsgi = {
+ enable = true;
+ user = "nginx";
+ runDir = "/var/lib/photostore";
+ plugins = [ "python3" ];
+ instance = {
+ type = "emperor";
+ vassals = {
+ cameraupload-server = {
+ type = "normal";
+ pythonPackages = self: with self; [ pkgs.cameraupload-server ];
+ socket = wsgi-sock;
+ };
+ };
+ };
+ };
+
+ services.nginx = {
+ enable = mkDefault true;
+ virtualHosts."photostore.krebsco.de" = {
+ locations = {
+ "/".extraConfig = ''
+ uwsgi_pass unix://${wsgi-sock};
+ uwsgi_param UWSGI_CHDIR ${workdir};
+ uwsgi_param UWSGI_MODULE cuserver.main;
+ uwsgi_param UWSGI_CALLABLE app;
+ include ${pkgs.nginx}/conf/uwsgi_params;
+ '';
+ };
+ };
+ };
+}
diff --git a/makefu/5pkgs/cameraupload-server/default.nix b/makefu/5pkgs/cameraupload-server/default.nix
new file mode 100644
index 000000000..e2e410958
--- /dev/null
+++ b/makefu/5pkgs/cameraupload-server/default.nix
@@ -0,0 +1,23 @@
+{ lib, pkgs, fetchFromGitHub, ... }:
+
+with pkgs.python3Packages;buildPythonPackage rec {
+ name = "cameraupload-server-${version}";
+ version = "0.2.4";
+
+ propagatedBuildInputs = [
+ flask
+ ];
+
+ src = fetchFromGitHub {
+ owner = "makefu";
+ repo = "cameraupload-server";
+ rev = "c98c8ec";
+ sha256 = "0ssgvjm0z399l62wkgjk8c75mvhgn5z7g1dkb78r8vrih9428bb8";
+ };
+
+ meta = {
+ homepage = https://github.com/makefu/cameraupload-server;
+ description = "server side for cameraupload_full";
+ license = lib.licenses.asl20;
+ };
+}