1
0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-06-13 16:23:41 +02:00

Move with-cross.nix functionaity into flake.nix

This commit is contained in:
Jake Waksbaum 2020-08-24 00:35:14 -04:00
parent a217594cf3
commit 78c96317b0
2 changed files with 9 additions and 13 deletions

View File

@ -12,6 +12,7 @@
} // flake-utils.lib.eachDefaultSystem ( } // flake-utils.lib.eachDefaultSystem (
system: system:
let let
inherit (nixpkgs) lib;
darwin_network_cmds_openssl_overlay = final: prev: { darwin_network_cmds_openssl_overlay = final: prev: {
darwin = prev.darwin // { darwin = prev.darwin // {
network_cmds = prev.darwin.network_cmds.override { openssl_1_0_2 = prev.openssl; }; network_cmds = prev.darwin.network_cmds.override { openssl_1_0_2 = prev.openssl; };
@ -39,13 +40,19 @@
defaultPackage = packages.sdImage; defaultPackage = packages.sdImage;
nixosConfigurations = nixpkgs.lib.nixosSystem { nixosConfigurations = lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
# Pass nixpkgs as an argument to each module so that modules from nixpkgs can be imported purely # Pass nixpkgs as an argument to each module so that modules from nixpkgs can be imported purely
specialArgs = { inherit nixpkgs; }; specialArgs = { inherit nixpkgs; };
modules = [ modules = [
{ nixpkgs.config.allowUnfree = true; } { nixpkgs.config.allowUnfree = true; }
(if system == "aarch64-linux" then "${self}/configuration.nix" else "${self}/with-cross.nix") "${self}/configuration.nix"
(
lib.optionalAttrs (system != "aarch64-linux") {
imports = [ "${self}/cross-hacks.nix" ];
nixpkgs.crossSystem.system = "aarch64-linux";
}
)
]; ];
}; };

View File

@ -1,11 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./cross-hacks.nix
./configuration.nix
];
nixpkgs.crossSystem = {
system = "aarch64-linux";
};
}