mirror of
https://github.com/samueldr/wip-pinebook-pro.git
synced 2025-01-24 09:49:48 +01:00
Move with-cross.nix functionaity into flake.nix
This commit is contained in:
parent
a217594cf3
commit
78c96317b0
2 changed files with 9 additions and 13 deletions
11
flake.nix
11
flake.nix
|
@ -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";
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./cross-hacks.nix
|
|
||||||
./configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.crossSystem = {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue