summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-09-12 14:23:33 +0200
committerlassulus <lass@blue.r>2018-09-12 14:23:33 +0200
commit296cec108130d5b626a24e9bf2e301f1ff8f8549 (patch)
tree7ed0b1ad9127091348e0a563e6da8c812a71f9e4 /makefu/2configs
parent6f85318656d90598388236e4b18a2f2f0cc14461 (diff)
parent859f98583788a9324be0e8c52d36a6bb812273fe (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/nginx/iso.euer.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/makefu/2configs/nginx/iso.euer.nix b/makefu/2configs/nginx/iso.euer.nix
new file mode 100644
index 000000000..701609d4b
--- /dev/null
+++ b/makefu/2configs/nginx/iso.euer.nix
@@ -0,0 +1,43 @@
+{ config, pkgs, ... }:
+let
+ system = builtins.currentSystem; #we can also build for other platforms
+ iso = (import <nixpkgs/nixos/lib/eval-config.nix>
+ { inherit system;
+ modules = [ ../../1systems/iso/config.nix ]; }
+
+ );
+ image = iso.config.system.build.isoImage;
+ name = iso.config.isoImage.isoName;
+
+ drivedroid-cfg = builtins.toJSON [{
+ id = "stockholm";
+ imageUrl = http://krebsco.de/krebs-v2.png;
+ name = "stockholm";
+ tags = [ "hybrid" ];
+ url = http://krebsco.de;
+ releases = [
+ { version = iso.config.system.nixos.label;
+ url = "/stockholm.iso";
+ arch = system; }
+ ];
+ # size = TODO;
+ }];
+ web = pkgs.linkFarm "web" [{
+ name = "drivedroid.json";
+ path = pkgs.writeText "drivedroid.json" drivedroid-cfg; }
+ { name = "stockholm.iso";
+ path = "${image}/iso/${name}"; }
+ ];
+in
+{
+ services.nginx = {
+ virtualHosts = {
+ "iso.euer.krebsco.de" = {
+ enableACME = true;
+ forceSSL = true;
+ root = web;
+ locations."/".index = "drivedroid.json";
+ };
+ };
+ };
+}