<TonyTheLion>
so I built my arm binaries for nix, now I need to make an installer. I was told to use the nix repo and build it with release nix. Not exactly sure what i should pass as arguments to the release.nix?
<makefu>
Mic92: i've read that rock64 support arrived in mainline with 4.14
<Mic92>
makefu: whatever these means. I am not sure if this includes all hardware components including ethernet.
<makefu>
too bad :(
<sphalerite>
TonyTheLion: hmm the release.nix doesn't seem to have any support for cross-compiling :/
<TonyTheLion>
:/
<sphalerite>
Mic92: that looks like a nixos image build scheme, not a nix installer cross-compilation tool to me?
<Mic92>
sphalerite: oh, then I missed some context. This repo is only meant for native compilation
<Mic92>
I actually cross-compiled anything so far.
<Mic92>
*nothing
<sphalerite>
TonyTheLion: shouldn't be too hard to add though. Just go through release.nix and add crossSystem wherever appropriate (maybe add it in the args at the top), then nix-build release.nix --arg crossSystem (whatever) --arg systems '["whatever"]' -A binaryTarball
<TonyTheLion>
sphalerite: I will play with this
<TonyTheLion>
thanks
<sphalerite>
np :)
<sphalerite>
Mic92: it's actually not too hard :D
<Mic92>
sphalerite: is this in the wiki already?
<sphalerite>
idk
<sphalerite>
well, it's not too hard to cross-compile stuff when all the support is there. Which it isn't always :D
<Dezgeg>
latest version of mainline claims support for Ethernet, SD/MMC, USB
<TonyTheLion>
at least I got it to build :P
<Dezgeg>
and DRM/framebuffer was in the works (for rock64 all that)
<Mic92>
sphalerite: so something like nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs> {}).lib.systems.examples.aarch64-multiplatform' -A tinc ?
<clever>
you will probably want to add it to your packageOverrides in configuration.nix or config.nix, it should be in the nixpkgs/nixos manuals
* clever
heads off to bed
<ZoomZoomZoom>
Yeah, I'm at it right now. I remember there was some announcement regarding overrides recently... The section on it in manual is a bit short, IMHO.
<ZoomZoomZoom>
Thanks, clever
ZoomZoomZoom has quit [Ping timeout: 268 seconds]
ZoomZoomZoom has joined #nixos-aarch64
<sphalerite>
clever: is it just me or is your sleep schedule even more out of whack than usual?
<Mic92>
ZoomZoomZoom: what kernel do you use?
<gchristensen>
holy crap
<gchristensen>
the community box isn't using its bonded NICs
<gchristensen>
Soni made me test it :) that fella should be reaching 20Gbps speeds :)
<TonyTheLion>
hello, can anyone tell me why I need to make an installer with the release.nix in when I build nix for another platform? Why can't I just copy the binaries to $HOME/profile.d/bin/?
<TonyTheLion>
oh I see because it doesn't just do what I think it idoes
<TonyTheLion>
oh I see because it doesn't just do what I think it idoes
<Mic92>
gchristensen: I also noticed the peering to Europe is quite bad.
<TonyTheLion>
basically, I built nix for the arm7v platform, on my x86 linux box, now I want to install it on the arm system
<TonyTheLion>
is there a simple way to do that? (without me having to edit the release.nix in the 'nix' repo)
<Mic92>
I mean from packet.net to my university
<gchristensen>
Mic92: that is disappointing. they have Seriously Good Bandwidth
<Mic92>
gchristensen: it is probably not there fault.
<andi->
didn't notice any bottlenecks from @home...
<andi->
and thats connected quiet beefy
<Mic92>
andi-: well I am UK. I noticed that peering over Telekom to my server was also better.
<andi->
o.O
<Mic92>
I finally rerouted it over the server
<andi->
here is is basically: (Ex-employer)<->llnw (FRA) <->packet (US)
<sphalerite>
TonyTheLion: basically have a look at how the install script works. The gist of it is 1. copy the binaries and 2. load the path registration — those are the key parts
<sphalerite>
TonyTheLion: other than that it's all "cosmetic" stuff like putting it on the PATH by default ;)
<TonyTheLion>
ah yes, that makes sense
<sphalerite>
TonyTheLion: but copying the bianries and loading the path registration to the database are the critical bits
<gchristensen>
anyone using the builder right now, and anyone mind if I break it?
<TonyTheLion>
sphalerite: sorry, but where does the install script live?
<sphalerite>
oh yeah that reminds me I still haven't PRed my addition of mips stuff
<gchristensen>
[nix-shell:~]$ speedtest
<gchristensen>
Hosted by Speedtest.net (New York City, NY) [0.21 km]: 5.221 ms
<gchristensen>
Download: 861.23 Mbit/s
<gchristensen>
Upload: 407.19 Mbit/s
<gchristensen>
it is a damn shame speedtest can't support 20gbps
<sphalerite>
lol
<TonyTheLion>
apparently my built nix binaries won't run on my arm machine :(
<TonyTheLion>
I can't run nix-store --init
<TonyTheLion>
cause it says 'no such file or directory' when the file clearly exists
<sphalerite>
Did you copy the full closure over?
<sphalerite>
It sounds like you're missing the loader
<TonyTheLion>
yes I copied the entire /nix/store/<longhash>--arm-unknown-linux-gnueabihf/
<sphalerite>
that's not the closure, that's just the path
<TonyTheLion>
oh
<TonyTheLion>
so what is the 'closure' here then?
<sphalerite>
the output of nix-store -qR on that path
<TonyTheLion>
oh wow
<TonyTheLion>
so all that goes into the /nix/store of my arm machien?
<sphalerite>
yes
<TonyTheLion>
41 lines of stuff
<TonyTheLion>
ok thanks for this, that helps
<TonyTheLion>
:)
<sphalerite>
tar c $(nix-store -qR /nix/store/<path>) | ssh -C root@arm-machine 'cd / ; tar xv'
<sphalerite>
:D
<sphalerite>
(or rsync if you have that)
ZoomZoomZoom has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-aarch64
ZoomZoomZoom has joined #nixos-aarch64
<TonyTheLion>
sphalerite: I'm going to have to do it without the ssh, cause I cannnot my arm machine from the machine I built it on
<TonyTheLion>
an oversight
<sphalerite>
well you get the idea :)
<TonyTheLion>
I guess I can just 'tar -zxvf $(nix-store -qR <path>)' Right
<sphalerite>
s/x/c/
<sphalerite>
and add a filename
<sphalerite>
you also need to get the path registration from somewhere
<TonyTheLion>
from the machine I built it on?
<sphalerite>
yeah
<sphalerite>
hang on, I don't actually know how to get that outside a derivation
<sphalerite>
hm there doesn't seem to be a command for it. So you'll need to write a little derivation for it as well >.>
<TonyTheLion>
oh
<TonyTheLion>
is there like an example or something?
<TonyTheLion>
I'm not sure what this 'registration path' actually is
<sphalerite>
http://ix.io/R77 this is how I build a script for installing nix on some boxes
<sphalerite>
the magic is in the tarball
<sphalerite>
bleh none of this is really ideal, is it xP
<TonyTheLion>
nix-boot-tarball
<TonyTheLion>
its not ideal no, because I'm not exactly an expert at nix derivations.
<TonyTheLion>
I know how to do basic ones
<gchristensen>
Mic92: how is the performance now
<sphalerite>
tbh what's probably easiest if you have a full regular linux distro on the arm machines is to install nix to /usr/local from source, then use nix copy to copy a nix-built nix over >_>
<sphalerite>
but hang on let me see if I can rejigger my deploy thing to work for your use case
<Mic92>
gchristensen: if you open a port for me, I could use iperf for that.
<Mic92>
my university has an inbound firewall unfortunally
<gchristensen>
what port?
<gchristensen>
heck, i'll just drop the firewall
<Mic92>
gchristensen: just any random tcp port would do
<Mic92>
ok
<gchristensen>
ok do your thing
<sphalerite>
TonyTheLion: what's the OS you're installing nix on?
<sphalerite>
And do you want single or multi-user installation? (I recommend multi-user!)
<Mic92>
gchristensen: on my server with gigabit in Germany I get: 254 Mbits/sec up and 70.9 Mbits/sec down. In my university in Edingburgh with gigabit: 55.6 up and 109 down.
<Mic92>
up means, I send
<gchristensen>
is that better? :)
<Mic92>
gchristensen: yes.
<gchristensen>
good :)
<Mic92>
Last time it was 2-5 mbit/s or so
<gchristensen>
ouch
<Mic92>
gchristensen: you can restore the firewall again, I would say
<gchristensen>
done :)
<sphalerite>
TonyTheLion: ok http://ix.io/R7B should do it. You'll probably want to read the script and make some adjustments though
<TonyTheLion>
oh wow cool :)
<TonyTheLion>
so I run this on my build machine right?
<TonyTheLion>
not the target arm
<TonyTheLion>
box
<sphalerite>
you nix-build -A nix-boot-tarball this on your build machine, then copy the tarball over, extract it in /, and run /nix-install-debian
<Dezgeg>
what's the end goal of this btw?
<TonyTheLion>
sphalerite: ah I see
ZoomZoomZoom has quit [Ping timeout: 240 seconds]
<TonyTheLion>
sphalerite: can I meanwhile already copy in the other stuff I zipped and copied over?
<TonyTheLion>
all the deps on my arm built nix
<sphalerite>
I don't think there's any point since it will all be in the tarball
<TonyTheLion>
ah I see
ZoomZoomZoom has joined #nixos-aarch64
<TonyTheLion>
sphalerite: that is building the nixUnstable one right?
<TonyTheLion>
just it gives me the same error that i had yesterday when I build nix 1.1 instead of nix 2.0
<sphalerite>
huh
<sphalerite>
yes it should be using nixUnstable
<TonyTheLion>
it does seem to say that 'crossPkgs.nixUnstable'
ZoomZoomZoom has quit [Quit: Leaving]
<TonyTheLion>
sphalerite: yesterday it worked when I build my local copy of nixpkgs
<TonyTheLion>
can I just tell it to build that instead of whatever it is doing now?
<sphalerite>
it works for me…
<sphalerite>
oh, maybe you're using the wrong nixpkgs
<TonyTheLion>
riddle me this, if I want to use this arm box as a build machine for hydra, do I need to install hydra on it?
<TonyTheLion>
cause thats what I need it to do :P
<TonyTheLion>
I have a hydra main box, so this is just a build machine
<sphalerite>
I don't think so
<TonyTheLion>
ok
<sphalerite>
but I don't really know much about hydra
<TonyTheLion>
phew
<sphalerite>
clever has a hydra setup involving ARM I think
<sphalerite>
oh but he's very probably asleep right now x)
<TonyTheLion>
from my understanding hydra just goes an executes the derivation on the build machine
<TonyTheLion>
I might ask him tomo
<TonyTheLion>
first gotta nix to run on my arm box
<TonyTheLion>
:P
<gchristensen>
yeah you'd just need to add it to the hydra box as a builder in the machines file
<TonyTheLion>
omg it built :)
<sphalerite>
I was quite surprised too, because I only realised after you said that it failed that I hadn't actually tested my rather drastic changes to it
<sphalerite>
depending on how many issues there are with cross-building, maybe I should just switch to a cross-building setup for my chromebook as well…
<sphalerite>
just set up my dad's server as a remote builder and somehow rejigger nixos-rebuild to pass system = "x86_64-linux" and crossSystem = (stuff) to nixpkgs
<TonyTheLion>
your help so far is definitely much appreciated :)
<TonyTheLion>
I feel like somewhere I should write some documentation about how to do this
<TonyTheLion>
so the next person can just be referred to it
<TonyTheLion>
rather than asking here again
<TonyTheLion>
and someone having to explain
<sphalerite>
well we already got a little bit of it on the wiki page out of this :)
<TonyTheLion>
oh nice
<sphalerite>
(all thanks to Mic92 who actually got up off his butt and put it in, unlike me)
<sphalerite>
but as for the installation process — that just generally needs improved IMHO
<sphalerite>
would be nice for nix's release.nix to support cross building so we can just cross-build regular install tarballs rather than my hacky install script
<sphalerite>
TonyTheLion: oh yeah particularly in my script I left my binary cache and dezgeg's set up. You may want to remove mine depending on how much you trust me :p
<sphalerite>
it probably won't have anything that you need anyway, so removing it will make stuff go more fasterer
<TonyTheLion>
ah I see
<TonyTheLion>
well I built it already
<TonyTheLion>
but it works
<TonyTheLion>
nix runs on my ARM box
<TonyTheLion>
THANK YOU :) :D
<TonyTheLion>
yes the installation process needs a bit of love for sure
<TonyTheLion>
not sure how anyone would currently figure that out (when building for a different arch) without coming to ask here
<sphalerite>
yaaaay
<sphalerite>
FWIW back when I was setting up my chromebook I just built and installed nix into /usr/local in a debian chroot to bootstrap it
<TonyTheLion>
oh wow
<TonyTheLion>
but you had to do all this init stuff no?
<TonyTheLion>
how did you figure that out?
<sphalerite>
not really — I just built nix from nixpkgs using the non-nix-store nix
<sphalerite>
There was probably some screwing about with NIX_SSL_CERT_FILE or something involved too
<sphalerite>
I forget :)
<TonyTheLion>
yes seems quite a task
<Mic92>
TonyTheLion: your contribution to the wiki would be appreciated.
<Mic92>
it is not clear to me, how I can add downladable assets to the nixos.org homepage.
<Mic92>
Otherwise I would have add a systemTarball already
<Mic92>
especially for new architectures this is crucial
<TonyTheLion>
Mic92: cool, let me know what I can do
<TonyTheLion>
I can definitely add anything about the arm stuff I did
<Mic92>
TonyTheLion: you have used cross-compiling to boostrap arm?
<TonyTheLion>
yep
<Mic92>
TonyTheLion: I have not quite followed, what hardware you were using, but whatever nix expression you managed to craft might be valuable to the next person. Depending on what you have done, you can add your board and link a github repo or so: https://nixos.wiki/wiki/NixOS_on_ARM
<Mic92>
TonyTheLion: also there is almost nothing about cross compiling in the wiki
<TonyTheLion>
ok cool
<TonyTheLion>
I won't be able to do that today, but perhaps over the weekend
<Mic92>
so feel free to make a new page, even if you just put three commands there
<Mic92>
better then nothing
<TonyTheLion>
cool :)
<Mic92>
There are people reading every change made in the wiki, so mistakes will be corrected eventually