diff --git a/flake.nix b/flake.nix index cd2326d..e27aabd 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + + robotnix = { + url = "github:nix-community/robotnix"; + #inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = { self, nixpkgs, ... }@inputs: @@ -77,9 +83,23 @@ }; }; + robotnixConfigurations = rec { + "phone" = inputs.robotnix.lib.robotnixSystem (import ./hosts/phone/default.nix); + }; + packages.x86_64-linux = { cbm = nixpkgs.x86_64.callPackage ./mods/cbm.nix { }; #default... TODO + run-vm = specialArgs.pkgs.writeScriptBin "run-vm" '' + ${self.nixosConfigurations.hpm.config.system.build.vm}/bin/run-hpm-vm -m 4G -cpu host -smp 4 + ''; + }; + + apps.x86_64-linux = { + default = { + type = "app"; + program = "${self.packages.x86_64-linux.run-vm}/bin/run-vm"; + }; }; }; } diff --git a/hosts/phone/default.nix b/hosts/phone/default.nix new file mode 100644 index 0000000..c42a340 --- /dev/null +++ b/hosts/phone/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: +{ + # These two are required options + device = "FP4"; + flavor = "lineageos"; + + # buildDateTime is set by default by the flavor, and is updated when those flavors have new releases. + # If you make new changes to your build that you want to be pushed by the OTA updater, you should set this yourself. + # buildDateTime = 1584398664; # Use `date "+%s"` to get the current time + + # signing.enable = true; + # signing.keyStorePath = "/var/secrets/android-keys"; # A _string_ of the path for the key store. + + # Build with ccache + # ccache.enable = true; +} diff --git a/hosts/phone/stuff.md b/hosts/phone/stuff.md index f0bdf26..090f7a0 100644 --- a/hosts/phone/stuff.md +++ b/hosts/phone/stuff.md @@ -1,3 +1,5 @@ - build android with nix flakes nix flake init -t github:danielfullmer/robotnix + +- there are really 1493 git repos that need to be cloned to build android.....