From 6376942fcaaa5069655a17e82eadf4d8cbaf633c Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 24 Oct 2021 10:28:52 +0200 Subject: all: configure OTA/updater --- flake.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 70cc436..752d694 100644 --- a/flake.nix +++ b/flake.nix @@ -6,10 +6,13 @@ outputs = { self, nixpkgs, robotnix }: let + baseUrl = "https://ota.ahem.wtf"; common = { apps = { bromite.enable = true; fdroid.enable = true; + + updater.enable = true; }; microg.enable = true; @@ -33,14 +36,20 @@ # configuration. Change it to something meaningful for you, perhaps just # the device name if you only have one of this kind of device. robotnixConfigurations.fp3 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: { + imports = [ common ]; + device = "FP3"; flavor = "lineageos"; - } // common); + apps.updater.url = "${baseUrl}/fp3/"; + }); robotnixConfigurations.fp2 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: { + imports = [ common ]; + device = "FP2"; flavor = "lineageos"; - } // common); + apps.updater.url = "${baseUrl}/fp2/"; + }); # This provides a convenient output which allows you to build the image by # simply running "nix build" on this flake. @@ -48,7 +57,8 @@ defaultPackage.x86_64-linux = self.robotnixConfigurations.fp3.img; hydraJobs.robotnixConfigurations = with nixpkgs.legacyPackages.x86_64-linux; { - fp3 = with self.robotnixConfigurations.fp3; + fp3.otaDir = self.robotnixConfigurations.fp2.otaDir; + fp3.products = with self.robotnixConfigurations.fp3; runCommandLocal "hydra-fp3-products-${config.buildNumber}" { } @@ -65,7 +75,9 @@ echo "file img $out/FP3-img-${config.buildNumber}.zip" >> $out/nix-support/hydra-build-products echo "file ota $out/FP3-ota_update-${config.buildNumber}.zip" >> $out/nix-support/hydra-build-products ''; - fp2 = with self.robotnixConfigurations.fp2; + + fp2.otaDir = self.robotnixConfigurations.fp2.otaDir; + fp2.products = with self.robotnixConfigurations.fp2; runCommandLocal "hydra-fp2-products-${config.buildNumber}" { } -- cgit v1.2.3