summaryrefslogtreecommitdiffstats
path: root/shared/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-11-17 22:15:07 +0100
committermakefu <github@syntax-fehler.de>2015-11-17 22:15:07 +0100
commit5aed0a395b2f78216bc02a7178527034bb079d28 (patch)
tree3e10c7b22b6f58ba25de1fc120b032708fedd00b /shared/2configs
parenta4ab19181b312a64a14f7da694e994959ce2b147 (diff)
shared wolf: static ip, fix todo
Diffstat (limited to 'shared/2configs')
-rw-r--r--shared/2configs/shack-drivedroid.nix18
-rw-r--r--shared/2configs/shack-nix-cacher.nix25
2 files changed, 43 insertions, 0 deletions
diff --git a/shared/2configs/shack-drivedroid.nix b/shared/2configs/shack-drivedroid.nix
new file mode 100644
index 00000000..294f3a36
--- /dev/null
+++ b/shared/2configs/shack-drivedroid.nix
@@ -0,0 +1,18 @@
+{ pkgs, lib, ... }:
+
+{
+ krebs.nginx = {
+ enable = lib.mkDefault true;
+ servers = {
+ drivedroid-repo = {
+ server-names = [ "drivedroid.shack" ];
+ # TODO: prepare this somehow
+ locations = lib.singleton (lib.nameValuePair "/" ''
+ root /var/srv/drivedroid
+ index main.json
+ '');
+ };
+ };
+ };
+
+}
diff --git a/shared/2configs/shack-nix-cacher.nix b/shared/2configs/shack-nix-cacher.nix
new file mode 100644
index 00000000..7519bb3a
--- /dev/null
+++ b/shared/2configs/shack-nix-cacher.nix
@@ -0,0 +1,25 @@
+{ pkgs, lib, ... }:
+
+{
+ krebs.nginx = {
+ enable = lib.mkDefault true;
+ servers = {
+ apt-cacher-ng = {
+ server-names = [ "acng.shack" ];
+ locations = lib.singleton (lib.nameValuePair "/" ''
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass http://localhost:3142/;
+ '');
+ };
+ };
+ };
+
+ krebs.apt-cacher-ng = {
+ enable = true;
+ port = 3142;
+ bindAddress = "localhost";
+ cacheExpiration = 30;
+ };
+}