summaryrefslogtreecommitdiffstats
path: root/2configs/nginx
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-09-10 14:56:24 +0200
committermakefu <github@syntax-fehler.de>2018-09-10 15:30:28 +0200
commite5a5a1fed63ce3512d5fab57866ce81a8375160b (patch)
tree4c68a99482af3c36c145592bad8635344ae81569 /2configs/nginx
parentdbcdd7b4199b46140d8010642d6dc84d5f7e3f8c (diff)
ma iso.euer.krebsco.de: expose iso as drivedroid repo
Diffstat (limited to '2configs/nginx')
-rw-r--r--2configs/nginx/iso.euer.nix27
1 files changed, 22 insertions, 5 deletions
diff --git a/2configs/nginx/iso.euer.nix b/2configs/nginx/iso.euer.nix
index 63ef380fa..522b7f6f8 100644
--- a/2configs/nginx/iso.euer.nix
+++ b/2configs/nginx/iso.euer.nix
@@ -1,4 +1,4 @@
-{config, pkgs, ... }:
+{ config, pkgs, ... }:
let
system = builtins.currentSystem; #we can also build for other platforms
iso = (import <nixpkgs/nixos/lib/eval-config.nix>
@@ -8,6 +8,25 @@ let
);
image = iso.config.system.build.isoImage;
name = iso.config.isoImage.isoName;
+
+ drivedroid-cfg = builtins.toJSON [{
+ id = "stockholm";
+ 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 = {
@@ -15,10 +34,8 @@ in
"iso.euer.krebsco.de" = {
enableACME = true;
forceSSL = true;
- locations."/" = {
- root = "${image}/iso";
- index = name;
- };
+ root = web;
+ locations."/".index = "drivedroid.json";
};
};
};