blob: 522b7f6f86e74ce2b62eb31f85fd5c29ebd0bca3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{ 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";
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";
};
};
};
}
|