Skip to content

Commit

Permalink
make pkgs more explicit and consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
oati committed Jan 19, 2023
1 parent d5caab3 commit 74580e5
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

perSystem = { system, pkgs, ... }: {
# override the `pkgs` argument used by flake-parts modules
# TODO: import nixpkgs with cross-compilation
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
crossSystem.system = "aarch64-linux";
localSystem.system = system;
overlays = [
inputs.rust-overlay.overlays.default
self.overlays.default
Expand All @@ -42,14 +42,21 @@
installer-bootstrap =
let
installer-system = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { modulesPath = inputs.nixpkgs + "/nixos/modules"; };
# make sure this matches the post-install
# `hardware.asahi.pkgsSystem`
pkgs = import inputs.nixpkgs {
crossSystem.system = "aarch64-linux";
localSystem.system = system;
overlays = [ self.overlays.default ];
};

specialArgs = {
modulesPath = inputs.nixpkgs + "/nixos/modules";
};

modules = [
./iso-configuration
{
nixpkgs.crossSystem.system = "aarch64-linux";
nixpkgs.localSystem.system = system;
hardware.asahi.pkgsSystem = system;
}
{ hardware.asahi.pkgsSystem = system; }
];
};
in installer-system.config.system.build.isoImage;
Expand Down

0 comments on commit 74580e5

Please sign in to comment.