2018-09-10 12:56:24 +00:00
|
|
|
{ config, pkgs, ... }:
|
2018-09-10 11:56:24 +00:00
|
|
|
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;
|
2018-09-10 12:56:24 +00:00
|
|
|
|
|
|
|
drivedroid-cfg = builtins.toJSON [{
|
|
|
|
id = "stockholm";
|
2018-09-10 15:13:24 +00:00
|
|
|
imageUrl = http://krebsco.de/krebs-v2.png;
|
2018-09-10 12:56:24 +00:00
|
|
|
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}"; }
|
|
|
|
];
|
2018-09-10 11:56:24 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
services.nginx = {
|
|
|
|
virtualHosts = {
|
|
|
|
"iso.euer.krebsco.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2018-09-10 12:56:24 +00:00
|
|
|
root = web;
|
|
|
|
locations."/".index = "drivedroid.json";
|
2018-09-10 11:56:24 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|