diff --git a/configuration.nix b/configuration.nix index d37a09d..fdbc27d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -54,33 +54,4 @@ 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; } diff --git a/cross-config.nix b/cross-config.nix new file mode 100644 index 0000000..510127e --- /dev/null +++ b/cross-config.nix @@ -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; +} diff --git a/sd-image.nix b/sd-image.nix index 91b143c..a72fc10 100644 --- a/sd-image.nix +++ b/sd-image.nix @@ -7,6 +7,7 @@ in imports = [ ./configuration.nix + ./cross-config.nix ]; sdImage.populateFirmwareCommands = "";