Trying to build new android host with CI

This commit is contained in:
Andrea Ciceri 2022-10-29 17:09:27 +02:00
parent e71fee8852
commit b3071a310f
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
4 changed files with 201 additions and 9 deletions

View file

@ -6,6 +6,7 @@
doomEmacs,
agenix,
comma,
robotnix,
...
}: let
supportedSystems = {
@ -15,9 +16,11 @@
pkgsFor = lib.genAttrs (lib.attrValues supportedSystems) (system: nixpkgsUnstable.legacyPackages.${system});
lib = nixpkgsUnstable.lib.extend (self: super: {
perSystem = super.genAttrs (super.attrValues supportedSystems);
});
lib = nixpkgsUnstable.lib.extend (self: super:
{
perSystem = super.genAttrs (super.attrValues supportedSystems);
}
// robotnix.lib);
mkConfiguration = {
name,
@ -49,7 +52,7 @@
};
};
mkConfigurations = {
nixosConfigurations = {
thinkpad = mkConfiguration {
name = "thinkpad";
system = supportedSystems.x86_64-linux;
@ -70,6 +73,25 @@
};
};
mkAndroidConfiguration = {
name,
device,
flavor,
}:
lib.robotnixSystem {
inherit device flavor;
};
androidConfigurations = {
oneplus5t = mkAndroidConfiguration {
name = "oneplus5t";
device = "dumpling";
flavor = "lineageos";
};
};
androidImages = lib.perSystem (system: builtins.mapAttrs (name: conf: conf.img) androidConfigurations);
mkVmApp = system: configuration: let
shellScript = pkgsFor.${system}.writeShellScript "run-vm" ''
${configuration.config.system.build.vm}/bin/run-${configuration.config.networking.hostName}-vm
@ -131,5 +153,15 @@
};
});
in {
inherit lib mkConfigurations mkVmApps supportedSystems formatApp formatter mkDevShell checkFormatting;
inherit
androidImages
checkFormatting
formatApp
formatter
lib
mkDevShell
mkVmApps
nixosConfigurations
supportedSystems
;
}