{ description = "A basic example robotnix configuration"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05"; inputs.robotnix.url = "github:danielfullmer/robotnix"; outputs = { self, nixpkgs, robotnix }: let common = { apps = { bromite.enable = true; fdroid.enable = true; seedvault.enable = true; }; microg.enable = true; /* webview.bromite = { enable = true; availableByDefault = true; }; */ # signing.enable = true; # signing.keyStorePath = "/var/secrets/android-keys"; # A _string_ of the path for the key store. # Build with ccache ccache.enable = true; }; in { # "dailydriver" is an arbitrary user-chosen name for this particular # 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, ... }: { device = "FP3"; flavor = "lineageos"; } // common); robotnixConfigurations.fp2 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: { device = "FP2"; flavor = "lineageos"; } // common); # This provides a convenient output which allows you to build the image by # simply running "nix build" on this flake. # Build other outputs with (for example): "nix build .#robotnixConfigurations.dailydriver.ota" defaultPackage.x86_64-linux = self.robotnixConfigurations.fp3.img; hydraJobs.robotnixConfigurations = with nixpkgs.legacyPackages.x86_64-linux; { fp3 = with self.robotnixConfigurations.fp3; runCommandLocal "hydra-fp3-products-${config.buildNumber}" { } '' mkdir -p $out/nix-support cp "${bootImg}" $out/boot.img cp "${factoryImg}" $out/FP3-factory-${config.buildNumber}.zip cp "${img}" $out/FP3-img-${config.buildNumber}.zip cp "${ota}" $out/FP3-ota_update-${config.buildNumber}.zip echo "file bootImg $out/boot.img" >> $out/nix-support/hydra-build-products echo "file factoryImg $out/FP3-factory-${config.buildNumber}.zip" >> $out/nix-support/hydra-build-products 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; runCommandLocal "hydra-fp2-products-${config.buildNumber}" { } '' mkdir -p $out/nix-support cp "${bootImg}" $out/boot.img cp "${factoryImg}" $out/FP2-factory-${config.buildNumber}.zip cp "${img}" $out/FP2-img-${config.buildNumber}.zip cp "${ota}" $out/FP2-ota_update-${config.buildNumber}.zip echo "file bootImg $out/boot.img" >> $out/nix-support/hydra-build-products echo "file factoryImg $out/FP2-factory-${config.buildNumber}.zip" >> $out/nix-support/hydra-build-products echo "file img $out/FP2-img-${config.buildNumber}.zip" >> $out/nix-support/hydra-build-products echo "file ota $out/FP2-ota_update-${config.buildNumber}.zip" >> $out/nix-support/hydra-build-products ''; }; }; }