Skip to content

Instantly share code, notes, and snippets.

@sorki
Created August 25, 2020 14:13
Show Gist options
  • Save sorki/548de08f621b066c94f0c36a7a78cc41 to your computer and use it in GitHub Desktop.
Save sorki/548de08f621b066c94f0c36a7a78cc41 to your computer and use it in GitHub Desktop.
rpi cross
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix>
];
nixpkgs = {
crossSystem.system = "armv7l-linux";
};
# closure minification
environment.noXlibs = true;
services.xserver.enable = false;
services.xserver.desktopManager.xterm.enable = lib.mkForce false;
# this pulls too much graphical stuff
services.udisks2.enable = lib.mkForce false;
# this pulls spidermonkey and firefox
security.polkit.enable = false;
boot.supportedFilesystems = lib.mkForce [ "vfat" ];
i18n.supportedLocales = lib.mkForce [ (config.i18n.defaultLocale + "/UTF-8") ];
documentation.enable = false;
documentation.nixos.enable = false;
}
export NIX_PATH=nixpkgs=/home/jane/local_nixpkgs_checkout
nix-build --cores 0 '<nixpkgs/nixos>' \
-I nixos-config=configuration.nix \
-A config.system.build.sdImage \
-o result-cross \
--keep-going
@doronbehar
Copy link

Interesting. IIRC that Aarch64 can't be used for my specific RPI hardware. It'd be nice if hydra could help us with the cross builds - see NixOS/mobile-nixos#197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment