Move cross configuration into new file
This commit is contained in:
parent
15f95ca074
commit
18fd4916f6
@ -54,33 +54,4 @@
|
|||||||
|
|
||||||
networking.wireless.enable = true;
|
networking.wireless.enable = true;
|
||||||
|
|
||||||
### Cross-compilation stuff ###
|
|
||||||
# Natively compiling on the pinecube is infeasible
|
|
||||||
|
|
||||||
nixpkgs.crossSystem = lib.recursiveUpdate lib.systems.examples.armv7l-hf-multiplatform {
|
|
||||||
platform = {
|
|
||||||
name = "pinecube";
|
|
||||||
kernelBaseConfig = "sunxi_defconfig";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
nixpkgs.overlays = [ (self: super: {
|
|
||||||
# Dependency minimization for cross-compiling
|
|
||||||
cairo = super.cairo.override { glSupport = false; };
|
|
||||||
libass = super.libass.override { encaSupport = false; };
|
|
||||||
gnutls = super.gnutls.override { guileBindings = false; };
|
|
||||||
polkit = super.polkit.override { withIntrospection = false; };
|
|
||||||
}) ];
|
|
||||||
|
|
||||||
# disable more stuff to minimize cross-compilation
|
|
||||||
# some from: https://github.com/illegalprime/nixos-on-arm/blob/master/images/mini/default.nix
|
|
||||||
environment.noXlibs = true;
|
|
||||||
documentation.info.enable = false;
|
|
||||||
documentation.man.enable = false;
|
|
||||||
programs.command-not-found.enable = false;
|
|
||||||
security.polkit.enable = false;
|
|
||||||
security.audit.enable = false;
|
|
||||||
services.udisks2.enable = false;
|
|
||||||
boot.enableContainers = false;
|
|
||||||
}
|
}
|
||||||
|
29
cross-config.nix
Normal file
29
cross-config.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nixpkgs.crossSystem = lib.recursiveUpdate lib.systems.examples.armv7l-hf-multiplatform {
|
||||||
|
platform = {
|
||||||
|
name = "pinecube";
|
||||||
|
kernelBaseConfig = "sunxi_defconfig";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ (self: super: {
|
||||||
|
# Dependency minimization for cross-compiling
|
||||||
|
cairo = super.cairo.override { glSupport = false; };
|
||||||
|
libass = super.libass.override { encaSupport = false; };
|
||||||
|
gnutls = super.gnutls.override { guileBindings = false; };
|
||||||
|
polkit = super.polkit.override { withIntrospection = false; };
|
||||||
|
}) ];
|
||||||
|
|
||||||
|
# disable more stuff to minimize cross-compilation
|
||||||
|
# some from: https://github.com/illegalprime/nixos-on-arm/blob/master/images/mini/default.nix
|
||||||
|
environment.noXlibs = true;
|
||||||
|
documentation.info.enable = false;
|
||||||
|
documentation.man.enable = false;
|
||||||
|
programs.command-not-found.enable = false;
|
||||||
|
security.polkit.enable = false;
|
||||||
|
security.audit.enable = false;
|
||||||
|
services.udisks2.enable = false;
|
||||||
|
boot.enableContainers = false;
|
||||||
|
}
|
@ -7,6 +7,7 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix>
|
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix>
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
./cross-config.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sdImage.populateFirmwareCommands = "";
|
sdImage.populateFirmwareCommands = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user