robotinx test config for my phone

This commit is contained in:
Sebastian Moser
2023-11-02 16:17:43 +01:00
parent debb87f3b8
commit a5554e71cd
3 changed files with 38 additions and 0 deletions

View File

@@ -27,6 +27,12 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
robotnix = {
url = "github:nix-community/robotnix";
#inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, ... }@inputs: outputs = { self, nixpkgs, ... }@inputs:
@@ -77,9 +83,23 @@
}; };
}; };
robotnixConfigurations = rec {
"phone" = inputs.robotnix.lib.robotnixSystem (import ./hosts/phone/default.nix);
};
packages.x86_64-linux = { packages.x86_64-linux = {
cbm = nixpkgs.x86_64.callPackage ./mods/cbm.nix { }; cbm = nixpkgs.x86_64.callPackage ./mods/cbm.nix { };
#default... TODO #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";
};
}; };
}; };
} }

16
hosts/phone/default.nix Normal file
View File

@@ -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;
}

View File

@@ -1,3 +1,5 @@
- build android with nix flakes - build android with nix flakes
nix flake init -t github:danielfullmer/robotnix nix flake init -t github:danielfullmer/robotnix
- there are really 1493 git repos that need to be cloned to build android.....