Skip to content

Instantly share code, notes, and snippets.

@lovesegfault
Created December 11, 2019 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lovesegfault/715498da596147cd765ae8c64cd967c2 to your computer and use it in GitHub Desktop.
Save lovesegfault/715498da596147cd765ae8c64cd967c2 to your computer and use it in GitHub Desktop.
❯ nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./sd-image.nix
error: Package ‘raspberrypi-firmware-1.20190925’ in /nix/store/layavi4hcjsxrcn88dfwl83fa78f53dc-nixos-20.03pre204199.3140fa89c51/nixos/pkgs/os-specific/linux/firmware/raspberrypi/default.nix:20 is not supported on ‘x86_64-linux’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
~/opt/rpi took 7s
❯ cat ~/.config/nixpkgs/config.nix
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: /home/bemeurer/.config/nixpkgs/config.nix
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 │ allowUnfree = true;
3 │ allowUnsupportedSystem = true;
4 │ }
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment