From 3be10ef41a1f72ad39a11576df180f44b435d8c5 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 10 Sep 2018 13:56:24 +0200 Subject: ma iso.euer.krebsco.de: init --- makefu/1systems/iso/config.nix | 1 + makefu/2configs/nginx/iso.euer.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 makefu/2configs/nginx/iso.euer.nix diff --git a/makefu/1systems/iso/config.nix b/makefu/1systems/iso/config.nix index f863321bd..34a75dbd3 100644 --- a/makefu/1systems/iso/config.nix +++ b/makefu/1systems/iso/config.nix @@ -11,6 +11,7 @@ with import ; # TODO: NIX_PATH and nix.nixPath are being set by default.nix right now # cd ~/stockholm ; nix-build -A config.system.build.isoImage -I nixos-config=makefu/1systems/iso.nix -I secrets=/home/makefu/secrets/iso /var/src/nixpkgs/nixos krebs.build.host = config.krebs.hosts.iso; + isoImage.isoBaseName = lib.mkForce "stockholm"; krebs.hidden-ssh.enable = true; environment.systemPackages = with pkgs; [ aria2 diff --git a/makefu/2configs/nginx/iso.euer.nix b/makefu/2configs/nginx/iso.euer.nix new file mode 100644 index 000000000..63ef380fa --- /dev/null +++ b/makefu/2configs/nginx/iso.euer.nix @@ -0,0 +1,25 @@ +{config, pkgs, ... }: +let + system = builtins.currentSystem; #we can also build for other platforms + iso = (import + { inherit system; + modules = [ ../../1systems/iso/config.nix ]; } + + ); + image = iso.config.system.build.isoImage; + name = iso.config.isoImage.isoName; +in +{ + services.nginx = { + virtualHosts = { + "iso.euer.krebsco.de" = { + enableACME = true; + forceSSL = true; + locations."/" = { + root = "${image}/iso"; + index = name; + }; + }; + }; + }; +} -- cgit v1.2.3 From 9d2749e5caa4b3c8e3208c821199d9c2484c349b Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 10 Sep 2018 14:56:24 +0200 Subject: ma iso.euer.krebsco.de: expose iso as drivedroid repo --- makefu/2configs/nginx/iso.euer.nix | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/makefu/2configs/nginx/iso.euer.nix b/makefu/2configs/nginx/iso.euer.nix index 63ef380fa..522b7f6f8 100644 --- a/makefu/2configs/nginx/iso.euer.nix +++ b/makefu/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 @@ -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"; }; }; }; -- cgit v1.2.3 From b2a3bd38ea70307c8b136eba42de7cc882afd441 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 10 Sep 2018 17:13:24 +0200 Subject: ma iso.euer: add imageUrl --- makefu/2configs/nginx/iso.euer.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/makefu/2configs/nginx/iso.euer.nix b/makefu/2configs/nginx/iso.euer.nix index 522b7f6f8..701609d4b 100644 --- a/makefu/2configs/nginx/iso.euer.nix +++ b/makefu/2configs/nginx/iso.euer.nix @@ -11,6 +11,7 @@ let drivedroid-cfg = builtins.toJSON [{ id = "stockholm"; + imageUrl = http://krebsco.de/krebs-v2.png; name = "stockholm"; tags = [ "hybrid" ]; url = http://krebsco.de; -- cgit v1.2.3