Created
March 27, 2018 02:34
-
-
Save awesomebytes/30b2d27957c25413219d7890a09083a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Build a nix for 32bit OS for another machine | |
# by using pkgsi686Linux.nix.override instead of nix.override | |
# it will build it in $HOME/rootfs/ | |
# to be stored in the other machine at $TARGET_MACHINE_HOME | |
TARGET_MACHINE_HOME=/home/nao | |
# Note that the build path needs plenty of free space | |
BUILD_PATH=/home/magiclab/nix_stuff/ | |
NIX_REMOTE=local?root=$BUILD_PATH/rootfs/ \ | |
nix-build -E 'with import <nixpkgs> {}; pkgsi686Linux.nix.override { storeDir = "'$TARGET_MACHINE_HOME'/nix/store"; stateDir = "'$TARGET_MACHINE_HOME'/nix/var"; confDir = "'$TARGET_MACHINE_HOME'/nix/etc"; }' -j 10 --cores 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment