wildtrees has quit [Quit: Leaving]
marius851000[m] has quit [Read error: Connection reset by peer]
sphalerit has quit [Read error: Connection reset by peer]
alienpirate5 has quit [Read error: Connection reset by peer]
Ox4A6F has quit [Read error: Connection reset by peer]
NickHu has quit [Write error: Connection reset by peer]
timclassic has quit [Read error: Connection reset by peer]
timokau[m] has quit [Write error: Connection reset by peer]
dtz has quit [Read error: Connection reset by peer]
cornu has quit [Read error: Connection reset by peer]
worldofpeace has quit [Remote host closed the connection]
Ericson2314 has quit [Read error: Connection reset by peer]
contrun[m] has quit [Read error: Connection reset by peer]
bennofs[m] has quit [Read error: Connection reset by peer]
danielrf[m] has quit [Read error: Connection reset by peer]
codyopel has quit [Read error: Connection reset by peer]
MichaelEden[m] has quit [Read error: Connection reset by peer]
nocent has quit [Read error: Connection reset by peer]
alj[m] has quit [Write error: Connection reset by peer]
thefloweringash has quit [Read error: Connection reset by peer]
balsoft has quit [Read error: Connection reset by peer]
atopuzov[m] has quit [Write error: Connection reset by peer]
sphalerit has joined #nixos-aarch64
craige has quit [*.net *.split]
codyopel has joined #nixos-aarch64
bennofs[m] has joined #nixos-aarch64
timokau[m] has joined #nixos-aarch64
cornu has joined #nixos-aarch64
Ericson2314 has joined #nixos-aarch64
dtz has joined #nixos-aarch64
alj[m] has joined #nixos-aarch64
thefloweringash has joined #nixos-aarch64
nocent has joined #nixos-aarch64
NickHu has joined #nixos-aarch64
danielrf[m] has joined #nixos-aarch64
timclassic has joined #nixos-aarch64
atopuzov[m] has joined #nixos-aarch64
worldofpeace has joined #nixos-aarch64
contrun[m] has joined #nixos-aarch64
Ox4A6F has joined #nixos-aarch64
alienpirate5 has joined #nixos-aarch64
MichaelEden[m] has joined #nixos-aarch64
marius851000[m] has joined #nixos-aarch64
craige has joined #nixos-aarch64
balsoft has joined #nixos-aarch64
balsoft has joined #nixos-aarch64
balsoft has quit [Changing host]
balsoft has quit [*.net *.split]
craige has quit [*.net *.split]
balsoft has joined #nixos-aarch64
craige has joined #nixos-aarch64
orivej has quit [Ping timeout: 276 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 265 seconds]
t184256 has left #nixos-aarch64 [#nixos-aarch64]
t184256 has joined #nixos-aarch64
zupo has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
zupo has quit [Ping timeout: 268 seconds]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 268 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
<DigitalKiwi> t184256: can i use sshd from nix ? i couldn't get it to work, but i could get it to work in the OG termux
<t184256> DigitalKiwi: I don't know, I didn't try any services
<t184256> Are they possible in single-user installs on other systemd-less systems?
<DigitalKiwi> i don't know
<DigitalKiwi> and it's the first time i've used home-manager too so that's not helping matters :P
<DigitalKiwi> ...i should probably read the docs sometime
FRidh has joined #nixos-aarch64
orivej has joined #nixos-aarch64
tilpner has quit [Quit: WeeChat 2.4]
tilpner has joined #nixos-aarch64
<DigitalKiwi> i might have figured it out
<DigitalKiwi> no :(
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tilpner has quit [Quit: installing logbook]
ryantrinkle has joined #nixos-aarch64
tilpner has joined #nixos-aarch64
<DigitalKiwi> closer...
<DigitalKiwi> t184256: where are the files stored on android storage?
<DigitalKiwi> i can find the one for termux but not this
<DigitalKiwi> 15:34:36 [kiwi@mvp-nixos ~]$ ssh nix-on-droid@192.168.1.205 -p 8888
<DigitalKiwi> Connection closed by 192.168.1.205 port 8888
<DigitalKiwi> which is better than it was at least...
<DigitalKiwi> GOT IT
<DigitalKiwi> kind of
<DigitalKiwi> i mean i got in but it didn't set up the shell right
<MichaelEden[m]> i got nixops cross-compiling to my raspberry pi 3, i can finally manage my rpi devices with nix 🎉
<simpson> Nice!
ryantrinkle has quit [Ping timeout: 276 seconds]
<t184256> DigitalKiwi: I'm a bit busy at the moment, but I'd definitely love to read a summary of your findings, even if it's just one line
wildtrees has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
zupo has quit [Ping timeout: 265 seconds]
vika_nezrimaya has quit [Read error: Connection reset by peer]
vika_nezrimaya has joined #nixos-aarch64
ris has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
FRidh has quit [Quit: Konversation terminated!]
zupo has quit [Ping timeout: 265 seconds]
zupo has joined #nixos-aarch64
mishac has joined #nixos-aarch64
<mishac> Hello everybody
<mishac> is there anyone online, who can help poor soul with cross-compiling on beaglebone
<mishac> I have been trying to find solution for several days and this is my last resort.
<mishac> just looking for some pointers advice
<MichaelEden[m]> mishac: i can!
<MichaelEden[m]> i was just working with beaglebones today: https://github.com/illegalprime/nixos-on-arm#beaglebone-green
<mishac> ohh, this is not about installing image on arm
<mishac> but rather building hellow world c program and then running it on target
<mishac> when i run ldd <binary> for binary compiled on beaglebone i get this output
<mishac> in the last line
<mishac> \/nix/store/mxqhmx01bbmqq5sd8c12sixcgmbwllz7-glibc-2.27-arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 => /lib/ld-linux-armhf.so.3 (0xb6f73000)
<clever> pkgs.pkgsCross.raspberryPi.hello will cross-compile from the current host to armv6 i believe
<mishac> but if i compile the binary on the beaglebone i get this
<clever> which should then work on the beaglebone, when copied with `nix-copy-closure`
<mishac> ohh this is not gnu hello word
<mishac> the is one the one I wrote,
<clever> just an example, you can build your own thing from the above
<mishac> i will plan to get more complex porgrams out
<mishac> any tips on how can i do that?
<clever> pkgsCross.raspberryPi.stdenv.mkDerivation can build your thing
<mishac> but how do i specify the makefile
<clever> src = ./path/to/source;
<mishac> or where do i specify the makefile commands
<clever> and put the Makefile in that dir
<clever> fastlist = pkgs.pkgsCross.mingwW64.callPackage ./fastlist.nix {};
<clever> in this example, i'm not even using a Makefile because the program is a single-source thing
<mishac> i see, thank you! let me try and build it and see if that works
<MichaelEden[m]> mishac: are you asking about how to write a nix derivation or what commands to use in your makefile?
<mishac> I am asking how to build < any c program > and then run it on beaglebone
<mishac> what i tried was
<mishac> creating a shell environment
<mishac> with
<clever> if you point nix-shell to an mkDerivation like above, $CC will be a cross-compiler
<mishac> do you mean
<mishac> I do something like
<MichaelEden[m]> clever: i do this to get a cross shell `nix-shell --pure -A pkgsCross.armv7l-hf-multiplatform.hello channel:nixos-unstable` is there a better way?
<mishac> pkgsCross.armv7l-hf-multiplatform.stdenv.mkDerivation {}
<clever> MichaelEden[m]: thats one simple way to do it
<mishac> yeah
<clever> mishac: that will fail because it lacks a name=
<mishac> I tried with creating shell with that paramter
<mishac> well
<mishac> there is name
<mishac> i am just putting a portion, which i think is relevant
<mishac> when i enter shell and run $CC my_c_file -o test
<mishac> it creates binary
<mishac> but it does not run on beaglebone
<MichaelEden[m]> what's the error?
<clever> you must copy the things it depends on as well
<clever> and thats why its better to use src= and nix-build
<mishac> and i tried nix build as well
<clever> then nix knows what it depends on, and can copy everything over
<clever> use nix-copy-closure, not plain scp
<mishac> i use
<mishac> NSF to share folder
<mishac> between beaglebone
<clever> mishac: is /nix/store at /nix/store on both machines?
<mishac> so there is no copying
<mishac> no
<mishac> beaglebone runs debian
<clever> thats why it doesnt work
<mishac> i set up NSF so that i can access my computer files from beaglebone
<clever> nix hard-codes the paths to libraries into the binary, and those paths point to /nix/store/
<mishac> yes
<clever> you must mount the computers /nix/store to /nix/store on the beaglebone
<mishac> \thats the problem
<mishac> that is exacrlt the problem
<clever> you can easily do that with nfs
<clever> mount desktop:/nix/store /nix/store
<mishac> what do yo mean: you must mount the computers /nix/store to /nix/store on the beaglebone
<mishac> install nix on beaglebone
<clever> `ls /nix/store/` must have the exact same output, on both the computer and beaglebone
<mishac> but beaglebone does not have
<mishac> nix store
<clever> then mkdir it
<mishac> just create mkdir
<mishac> with the
<clever> yes, `mkdir /nix/store/`
<clever> then mount the desktops store to that
<mishac> through nfs?
<clever> yes
<mishac> ohhh
<mishac> that is
<mishac> clever
<mishac> i didnt think about that
<mishac> i see that should fix the problem
<mishac> however
<clever> 2 main problems with that
<clever> #1, you cant run nix commands on the beaglebone (having 2 machines write to the store at once isnt safe)
<clever> #2, the beaglebone now relies on the desktop to access those binaries, and wont work without the desktop
<mishac> ^
<mishac> both are very important
<clever> one minute
<mishac> and i have scouring web on how to make it work
<mishac> so that i get /lib/ld-linux-armhf.so.3 (0xb6f0f000)
<simpson> Yeah, clever is only sketching how to get up and running immediately. In the longer run, you'll presumably want to use Nix on the Bone directly.
<clever> you solve both, by just installing nix, and not using nfs
<clever> then use nix-copy-closure, as i said at the begining
<clever> make-system-tarball.nix, will generate a tarball you can unpack to /, that contains a given set of packages
<clever> nix-store --load-db < /nix/store/nix-path-registration
<clever> there should be a nix-path-registeration within that tar somewhere
<clever> use that to initialize db.sqlite after you unpack the tar
<mishac> i isee
<mishac> is there any other way?
<clever> nix-repl> pkgsCross.armv7l-hf-multiplatform.nix
<mishac> what will it do?
<clever> this will cross-compile nix to armv7
<clever> «derivation /nix/store/xir8pmlxsm5b089bj17wzs6hjkj89v77-nix-2.2.2-armv7l-unknown-linux-gnueabihf.drv»
<clever> so you can put that cross-compiled nix, into a tar, then unpack the tar on the beaglebone, and --load-db its registration file
<clever> that will "install" nix onto the beaglebone
<clever> then you can use normal nix-copy-closure to push future changes over
<mishac> any way there I could just compile program on my machine and transfer through NFS and let it run beaglebone?
<clever> you need nix on the beaglebone to do that
<mishac> ohh
<clever> or reverse the nfs mount, and use local?root and `nix copy`
<mishac> install nix package manager
<clever> and i just explained how to cross-compile nix, put it into a tar, and then install that tar
<mishac> so the command above, it will cross compile specific package
<clever> yeah
<mishac> so in the future , i encounter more packages that are missing, i would have to do it for them as well
<mishac> ok
ryantrinkle has quit [Ping timeout: 265 seconds]
<mishac> let me try that do that
<MichaelEden[m]> mishac: you can have nix list out all the dependencies and just rsync them to the target machine if you don't want nix installed on the beaglebone
<clever> but that wont properly manage db.sqlite, and wont skip things the beaglebone already has, making the copies take longer
<clever> you can also do similar if you use make-system-tarball.nix and just blindly unpack many tar's to the same root
<MichaelEden[m]> clever: yea i'm assuming this board is disposable and db.sqlite doesn't need to be kept updated
<MichaelEden[m]> also rsync will skip over things already on target right?
<clever> but it will eventually run out of space, and you will need to GC
<clever> MichaelEden[m]: depends on the rsync flags i believe, i dont use it much
<MichaelEden[m]> oh true, i guess i would just blow away everyhing at that point, or tell rsync to delete things that aren't in the file list
<clever> and it gets complicated as soon as you want 2 different exprs on the bone
<simpson> At some point, working with Nix becomes easier than working against Nix.
<MichaelEden[m]> yeah
<MichaelEden[m]> i stick a usb drive in the bone and bind-mount. oh, I forgot to mention I have a statically linked ARMv7 nix if you need it mishac
<clever> MichaelEden[m]: local?root= can help if your using usb drives, or flipping the nfs the other direction
v0|d has joined #nixos-aarch64
<clever> if you remove the root disk from the beaglebone, and then mount it to /mnt on a desktop (or nfs mount the beaglebone to /mnt)
<clever> then you can `nix copy --to local?root=/mnt /nix/store/whatever`
<clever> and that will copy from /nix/store to /mnt/nix/store
<MichaelEden[m]> oh neat
<clever> then you dont need nix on the beaglebone (but you could use this to copy nix to it as well)
<MichaelEden[m]> there's so many nix tricks i learn everyday
<clever> nix copy --to ssh://root@target?remote-store=local?root=/mnt /nix/store/hash-nixos
<clever> this is another variation
<clever> that tells the local nix to ssh into root@target
<clever> then tells the remote nix to open /mnt/nix/store, on the remote machine
* simpson takes notes
<clever> then it copies /nix/store/hash-nixos to /mnt/nix/store on the remote box
<clever> nixos-install --system /nix/store/hash-nixos --root /mnt
<clever> and if you then run this, over ssh, it will finalize the install, and never need a configuration.nix
<{^_^}> nixops#1189 (by cleverca22, 4 weeks ago, open): plan for supporting custom partition layouts and custom FS's on any backend
<mishac> I see
<mishac> thank you
<clever> and nixops could do both steps, over a recovery console, to install the nixops config, and skip the 1st dummy generation
<mishac> Clever, one question. When you said: if you remove the root disk from the beaglebone, and then mount it to /mnt on a desktop (or nfs mount the beaglebone to /mnt)
<mishac> what do you mean remove root disk from the beaglebone
<clever> mishac: is the root disk an sd card? usb stick? or flash soldered to the board?
<mishac> flash soldered on board
<clever> ah, then you cant remove it
<mishac> yep
<clever> your only choice (for that route) is to nfs mount beaglebone:/nix to /mnt/nix
<mishac> I see
<clever> then you can use the x86 nix to copy things into the beaglebone, and dont need nix on the bone immediately
<clever> 2019-09-17 18:17:20 < clever> then you can `nix copy --to local?root=/mnt /nix/store/whatever`
<mishac> clever, last clarification "is to nfs mount beaglebone:/nix to /mnt/nix" can you parahrase
<clever> configure an nfs server on the beaglebone, to export /nix
<clever> and then run `mount -v beaglegone:/nix /mnt/nix` on any x86 machine with nix
<mishac> and /nix is the
<clever> the /nix can be a completely empty directory at this step
<mishac> just a some directory that is exported by beaglebone
<mishac> and use nix copy to transfer files
<clever> it must appear at /nix on the beaglebone, for things to function correctly
<mishac> ?
<clever> yeah
<mishac> so no need to use copy clousure
<clever> use `nix copy` instead, as i showed in the last example
<mishac> yeah
<mishac> great
<mishac> and one last last question
<clever> and since the nfs mount is going the other way, the beaglebone can survive on its own
<clever> it just looses the ability to modify things in /nix/store/
<clever> until you re-mount things, and have an x86 help out
<mishac> i see
<mishac> just thinking a bit ahead
<MichaelEden[m]> If you're willing to have a NixOS image on your beaglebone you can use NixOps to do all the updating
<mishac> Michael, that is something i will consider doing in the future
<mishac> just need it for class
<MichaelEden[m]> clever: the nfs method you described, does that update the sqlite database?
<mishac> clever, thinking ahead, is it possible to write a build script (post install script) where this nix-copy command is executed automatically
<clever> MichaelEden[m]: yeah, `nix copy --to local?root=/mnt` will maintain the sqlite db as it copies things
<clever> mishac: its basically just `nix-build -A foo && nix copy --to local?root=/mnt ./result`
<mishac> wonderful
<mishac> thank you very much
<mishac> !!
<MichaelEden[m]> Cool stuff clever
<mishac> i have enough info go from here
<mishac> Clever, i just did what you described and run into problem with using
<mishac> nix copy command
<mishac> error: cannot add path '/nix/store/5lyvydxv0w4f2s1ba84pjlbpvqkgn1ni-linux-headers-4.19.16' because it lacks a valid signature
<mishac> is it something beaglebone realated
<mishac> or nixos related
<clever> mishac: try running that command as root
<mishac> same error
<clever> mishac: try adding `--option require-sigs false` without root
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mishac> it copied something
<mishac> but now when i examine /nix folder
<mishac> on beaglebone
<mishac> it has store var
<mishac> and some packages
<mishac> so if i understand correctly what the command it copied some of the nix-store information
<mishac> to beaglebone
<mishac> correct?
<mishac> then the question is how can i access binaries?
<mishac> that i compiled
zupo_ has joined #nixos-aarch64
<MichaelEden[m]> If you `ls /nix/store` can you see anything with the name of your derivation?
<mishac> hmm
<mishac> this is weid, i think i did some things incorrectly
t184256 has left #nixos-aarch64 ["Error from remote client"]
t184256 has joined #nixos-aarch64
mishac has quit [Ping timeout: 260 seconds]
<DigitalKiwi> t184256: do you know why i can't find the directory where the data is stored? it seems to not exist :|
<DigitalKiwi> /Internal shared storage/Android/data/com.termux/
<DigitalKiwi> I'd expect there to be one named com.termux.nix but it's not there
<DigitalKiwi> there's another one too Android/data/com/termux/
ryantrinkle has joined #nixos-aarch64
wildtrees has quit [Quit: Leaving]