phone: Add virtual machine support for x86_64-linux

This makes it possible to test the phone config in a virtual machine on
x86_64 machines.
This commit is contained in:
Donovan Glover 2024-06-15 11:35:50 -04:00
parent 4e18c839de
commit 8527ad719d
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -10,11 +10,19 @@
outputs = { self, nixpkgs, mobile-nixos } @ attrs: outputs = { self, nixpkgs, mobile-nixos } @ attrs:
{ {
nixosConfigurations = { nixosConfigurations =
let
modules = [
./configuration.nix
./hardware-configuration.nix
];
in
{
mobile-nixos = nixpkgs.lib.nixosSystem { mobile-nixos = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = attrs; specialArgs = attrs;
modules = [
modules = modules ++ [
(import "${mobile-nixos}/lib/configuration.nix" { (import "${mobile-nixos}/lib/configuration.nix" {
device = "pine64-pinephone"; device = "pine64-pinephone";
}) })
@ -25,11 +33,15 @@
splash = nixpkgs.lib.mkDefault true; splash = nixpkgs.lib.mkDefault true;
}; };
} }
./configuration.nix
./hardware-configuration.nix
]; ];
}; };
mobile-nixos-vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
inherit modules;
};
}; };
}; };
} }