gchristensen changed the topic of #nixos to: Share the output of nix-shell -p nix-info --run nix-info to help us help you. || https://nixos.org || Latest NixOS: https://nixos.org/nixos/download.html || Latest Nix: https://nixos.org/nix/download.html || Logs: https://logs.nix.samueldr.com/nixos/ || #nixos-dev, #nix-darwin, #nixos-aarch64, #nixos-chat
<tobiasBora> (tried LDFLAGS="-static")
marusich has quit [Ping timeout: 276 seconds]
jtojnar_ has joined #nixos
jtojnar has quit [Read error: Connection reset by peer]
marusich has joined #nixos
<{^_^}> Channel nixpkgs-18.03-darwin advanced to https://github.com/NixOS/nixpkgs/commit/52e6f6f60ce (from 81 minutes ago, history: https://channels.nix.gsc.io/nixpkgs-18.03-darwin)
rogue_koder has joined #nixos
pkill9 has quit [Ping timeout: 245 seconds]
jtojnar_ has quit [Ping timeout: 276 seconds]
jtojnar has joined #nixos
<{^_^}> Channel nixos-17.09-small advanced to https://github.com/NixOS/nixpkgs/commit/b7e51bf4ffb (from 2 hours ago, history: https://channels.nix.gsc.io/nixos-17.09-small)
maximiliantagher has quit [Remote host closed the connection]
maximiliantagher has joined #nixos
maximiliantagher has quit [Ping timeout: 264 seconds]
maximiliantagher has joined #nixos
<la_putin> u want a entirely static build of nix?
<la_putin> as in every single nix application compiled statically? 0.0
<la_putin> tobiasBora:
<tobiasBora> la_putin: I want a static build of nix, i.e. nix-build, nix-env... Then I don't mind about the nix applications in /store
<boomshroom> tobiasBora: I take it you're trying to bootstrap?
<tobiasBora> the thing is that I compile in a chroot that don't have the same libraries/interpreter (libc, musl...) as the host guest, so I'd like to statically compile it to avoid any library clash
<tobiasBora> boomshroom: exactly
<boomshroom> tobiasBora: Do you have another machine already using Nix?
<tobiasBora> boomshroom: I would like to be able to avoid it. In fact I want to build a script that can install nix on, basically, any device that has access to wget and bash, and has an alpine basic chroot tar available for the architecture.
<tobiasBora> (and of course without root access)
<boomshroom> tobiasBora: Well you're going to need GCC since it is a C program. Since Nix is the prefered build tool of Nix users, it tends to be what we normally use to build Nix, even for platforms that don't have Nix.
<tobiasBora> boomshroom: yes sure, I can install any dep I need in, including gcc, bison, flex, whatever
<boomshroom> I have a Nix script that builds a tarball that can be unpacked on a target machine that contains all of Nix's dependencies.
<boomshroom> You can install Nix locally, modify the script to your needs, and run it and you'll get a tarball that contains everything you need to deploy Nix.
<tobiasBora> interesting, can I give it a look
srdqty has quit [Quit: WeeChat 1.9.1]
srdqty has joined #nixos
<boomshroom> Specifically, that script is tailored to build for an ARM7l target, but that is easilly changed. If you're target is the same as your host, then half of the 9 lines can be removed.
<boomshroom> The important part is nixpkgs/nixos/lib/make-system-tarball.nix
<tobiasBora> the interesting stuff is to cross compile here. Nix sounds magic sometime
<boomshroom> That's what I used to get Nix on my old phone after not finding a way to statically compile.
<boomshroom> Nix feels magic sometimes.
<tobiasBora> ahah that's indeed one of my goal
<boomshroom> Static compilation was what I looked for at first as well, before realizing that static compilation was just one way to bootstrap and bootstrapping was what I really wanted. Something similar to that script was offered to me when I asked about it.
<tobiasBora> The problem is that here you need to have nix to use your script... And on my case I want to bootstrap from the same computer as the user. But I think I'll try to mix proot, then build a first version of nix, copy it in the host with the libraries, and rebuild another time nix with the good parameters to make nix depend on libs only in ~/store/...
<boomshroom> Tell me once you've got the tarball. It needs to be extracted to the root (or chroot) and contains a script that needs to be run in order to initialise everything.
<tobiasBora> boomshroom: the script needs to be run at each single bash run right?
<boomshroom> The afformentioned script is just the initialise the database and is only run once and can be deleted.
<tobiasBora> oh ok. Which database? The /nix/store files?
grw has quit [Ping timeout: 240 seconds]
<boomshroom> tobiasBora: In that case, I'd build a normal, dynamically linked version and use that to build the full nix. If that's the case, the script I gave you is unnessisary.
<boomshroom> It sounds more like you want to do what I did on my university machine.
<boomshroom> The database I mentioned is actually /nix/var/nix/db/db.sqlite
<tobiasBora> boomshroom: yes I'll do that. The only problem is that proot segfault if I build nix out of nix from the chroot, so I'll need to first copy nix on the host, and then run it
<boomshroom> You can't just copy packages by hand into the store and expect it to work. I learned that the hard way.
<tobiasBora> boomshroom: and indeed, it's exactly the issue, I've a computer in a lab that I want to turn into nix. And in the same way, create an easy script to let me do that everywhere
<tobiasBora> boomshroom: oh really? Interesting ^^'
<boomshroom> Once you've got one nix, it's easy to make more.
<tobiasBora> By the way, if I manually compile it, do I need your script to build /nix/var/*/db.sqlite?
<boomshroom> No. That's just if you're starting with packages (like Nix and its dependencies) already in the store.
<boomshroom> Since your first Nix build will be external, it will be able to initialise the database itself when the first packages get installed.
<tobiasBora> ok thank you
<boomshroom> Now I haven't been able to get proot or nix-user-chroot to work, but that's another story.
<boomshroom> I should ask, are you trying to install Nix in a chroot, or not?
deepfire has quit [Ping timeout: 246 seconds]
<boomshroom> Got proot working. Nix is now installing to my school drive!
maximiliantagher has quit [Remote host closed the connection]
<tobiasBora> boomshroom: In a proot actually
maximiliantagher has joined #nixos
<tobiasBora> proot works great most of the time
<tobiasBora> but I'd like to build a new nix to be able to avoid the proot overhead
<boomshroom> tobiasBora: Then you don't need to build anything manually. The official installed will work right in the proot like I'm currently waiting on.
<tobiasBora> boomshroom: yes I know, but it's slower because you are in the proot
<boomshroom> Without proot, you just build it like a normal gnu application.
<boomshroom> OR... you can make the proot nix build a non-proot nix with the right configuration...
<tobiasBora> boomshroom: that what I want to do yes
<tobiasBora> so I ran from host this: LD_LIBRARY_PATH=/home/test/local/local/lib X=test NIX_CONF_DIR=/home/$X/etc/nix NIX_LOG_DIR=/home/$X/nix/var/log/nix NIX_STORE=/home/$X/nix/store NIX_STATE_DIR=/home/$X/nix/var /home/test/local/local/lib/ld-musl-x86_64.so.1 /home/test/local/local/bin/nix-build -E 'with import <nixpkgs> {}; nix.override { storeDir = "/home/'$X'/nix/store";stateDir = "/home/'$X'/nix/var"; confDir =
<tobiasBora> "/home/'$X'/etc"; }'
<tobiasBora> (this command is not mine)
<boomshroom> I actually just replaced my non-proot version with a proot version so I could use the binary cache.
<tobiasBora> (thanks cleaver)
<tobiasBora> boomshroom: and yes the proot version is really nice
<tobiasBora> but I will try to have the two versions on the same system
peciolo has quit [Ping timeout: 260 seconds]
<boomshroom> That command isn't much different from what I used.
<tobiasBora> one proot for install speed
<tobiasBora> and one non-proot
<tobiasBora> boomshroom: yes, but I get an error
<tobiasBora> error: opening file '/home/test/local/share/nix/corepkgs/derivation.nix/default.nix': No such file or directory
<tobiasBora> what should I put in this file?
maximiliantagher has quit [Ping timeout: 264 seconds]
<srid> Why is `nixos-rebuild switch` trying to download from cache even after removing the binary cache from configuration files?
deepfire has joined #nixos
<boomshroom> srid: Did you just remove it? nixos-rebuild can't use the configuration until after it builds it.
<srid> boomshroom: Ya. I removed it because the cache in question is no longer accessible. Have I locked myself then?
<tobiasBora> (and nix path is set up to nixpkgs=/tmp/a/nixpkgs, where this is a git clone of pkg)
<boomshroom> srid: It usually times out eventually and falls back to a local build, but it may take a while.
<ottidmes> srid: Did you run systemctl restart nix-daemon, the changes in the configuration won't take until you do
orivej has quit [Ping timeout: 276 seconds]
<ottidmes> srid: Unless you mean your nixos configuration, then it should do that automatically, but if you changed nix.conf yourself, you have restart the daemon to reload the config
peterzky has joined #nixos
<tobiasBora> ok problem solved
<maurer> Anyone know how to add another nixos package as a dependency when using carnix?
<tobiasBora> What???
<tobiasBora> I don't understand why, but I have an error builder for '/home/test/nix/store/bxa801dlnhw5vwzizyzs7yr13ldwav0x-0001-Fix-missing-build-dependency-for-pods.patch.drv' failed due to signal 11 (Segmentation fault)
<tobiasBora> I though it was because of the proot, but even as non-proot, it fails
<boomshroom> It looks like my phone might start working again. If it does, thats 4 devices that I will have Nixified.
<ottidmes> boomshroom: Other than being awesome :P what do you plan to use nix for on your phone?
<boomshroom> ottidmes: Probably nothing. It's not even my primary phone.
<tobiasBora> boomshroom: you should try to build a nix binary cache for armv7 ;)
<boomshroom> It looks like my phone's battery is dead and when it starts to recharge, it boots up and imediately looses the power it got.
<boomshroom> tobiasBora: I've considered giving it a full NixOS installation, but it would be tricky since there aren't many linux applications or desktops designed to work on a phone screen
<ottidmes> boomshroom: I had that too with my laptop, but in that case it was indeed just dead, which was too be expected after 7.5 years intensive use
<tobiasBora> boomshroom: sure
<boomshroom> ottidmes: Oo. How many years have I had this phone? Probably at least 4. I replaced it with a 5x which got LD'd and replaced twice before getting a pixel this past fall.
maximiliantagher has joined #nixos
blankhart has quit [Ping timeout: 264 seconds]
<boomshroom> Sorry, "LG'd"
notthemessiah has joined #nixos
maximiliantagher has quit [Ping timeout: 246 seconds]
thc202 has quit [Ping timeout: 240 seconds]
<{^_^}> Channel nixpkgs-17.09-darwin advanced to https://github.com/NixOS/nixpkgs/commit/b7e51bf4ffb (from 4 hours ago, history: https://channels.nix.gsc.io/nixpkgs-17.09-darwin)
<tobiasBora> Small question:
<tobiasBora> if you recompile nix to fix some bugs, will it try then to rebuild all the packages, or it will still use the binary cache?
<boomshroom> Nix itself? That depends on whether or not nix hashes itself when building packages. I'd assume it doesn't, but I can't be certain.
<tobiasBora> I hope it's not ^^'
<tobiasBora> By the way, is it normal if ./configure is much more quicker than compiling nix from nix itself?
<tobiasBora> much quicker*
<gchristensen> it isn't, fwiw
<gchristensen> a built store path isn't tied to a particular nix version
<adisbladis[m]> tobiasBora: Just rebuilding nix itself should not cause hash changes.
<boomshroom> tobiasBora: I'm not surprised. Nix does a lot that wouldn't be done in a normal build, mostly in the name of safety.
<tobiasBora> ok thank you everyone
<tobiasBora> boomshroom: safety in what sense?
<boomshroom> Things like making sure packages don't access what they're not supposed to access. There's also the ungodly number of symlinks that need to be traversed.
<gchristensen> the slowness Nix adds _should_ only be at the start of the build, not during the build fwiw
<boomshroom> How do I specify remote builders in a proot installation?
<tobiasBora> boomshroom: gchristensen : well even in the number of things it seems to build... I can see plenty of things that are built...
<tobiasBora> And noooo it just failed... :'(
<tobiasBora> /home/testproot/nix/store/k7wbzld9mvns6dzgysdy1pzxdz1v7ds8-audit-tmpdir.sh: xmalloc: variables.c:4024: cannot allocate 1139 bytes (16777216 bytes allocated)
<tobiasBora> builder for '/home/testproot/nix/store/j8ikzw15js71nwmhd221ppwlm5h5cidi-binutils-2.28.1.drv' failed with exit code 2
<tobiasBora> and I think that it builds everything, including the glib, gmp, gcc...
<tobiasBora> so that's why it's that long
<boomshroom> This is the non-proot? In that case, it really does want to build EVERYTHING.
<tobiasBora> boomshroom: I started from scrach, but from my own destop
<tobiasBora> I compiled using ./configure
<tobiasBora> and then compile nix from nix
<tobiasBora> so I guess it's normal to build everything
<boomshroom> tobiasBora: If you're on your own machine, why not just use the installer?
<tobiasBora> If I restart the command, will it cache the intermediate results if it fails, or it starts from scratch at each time ?
<tobiasBora> boomshroom: to test
<tobiasBora> first I try on my own machine, no proot, then on my own machine, proot, and finally on the remote machine, proot
<tobiasBora> but for no the first steps fails, so I've no reason to try the next one ;à
<tobiasBora> ;)
<boomshroom> tobiasBora: Got it. It will hold onto packages that build completely, but if something built and a test failed, then it will rebuild it again.
<tobiasBora> ok thanks
<tobiasBora> It has been compiling for 30mn now... I can't imagine the time to compile it on proot
<tobiasBora> oh in fact I should be able to compile it outside of the proot once I ran ./configure once
logzet has quit [Ping timeout: 240 seconds]
<boomshroom> tobiasBora: That's why I'm going to try not building it on proot. Once it's configured correctly, I'm going to have my desktop do the building for it.
logzet has joined #nixos
<adisbladis[m]> tobiasBora: Nix does not do incremental builds. So if you fail you start over from scratch every time.
<tobiasBora> adisbladis[m]: too bad
<tobiasBora> so how can you peacefully code in nix?
<adisbladis[m]> tobiasBora: That would be impure.
<tobiasBora> if you develop firefox, you would become crazy I guess
<boomshroom> Is there a nix function to get each file in a directory? If so, it should be possible to translate a Makefile into nix and get incremental compilation by treating each object as its own derivation.
<adisbladis[m]> tobiasBora: I mostly do my hacking in an imperative fashion (using nix-shell to pull in deps) and then nix the build for production
<boomshroom> If I'm not mistaken, I think there might be an effort to translate Ninja build in such a way.
<tobiasBora> ok nice
<tobiasBora> if failed again...
<tobiasBora> grrrrr
<tobiasBora> and by the way, why do I have so much copies of bash???
<tobiasBora> yy7q1d3hxzcyjp75sw5v6rxgxpz8ybbd-bash44-009
<tobiasBora> xl8n4ry0953s1ag81cmcf0s9p4ds19iw-bash44-011
<tobiasBora> ...
<tobiasBora> 26 times
<dtz> haha most of those are bash patches
<dtz> 001, 002, ...
pie_ has joined #nixos
<boomshroom> Only 26? I checked for bash directoies and I got 102
Supersonic112 has joined #nixos
Supersonic has quit [Disconnected by services]
<tobiasBora> boomshroom: well it did not finished to compile my first one...
<tobiasBora> dtz: each one is supposed to be a full bash ???
<dtz> no, they're files containing each of the 12 patches applied to bash
<dtz> so they're each small lol
Supersonic112 is now known as Supersonic
<tobiasBora> ok, fair enough
n0qqe has joined #nixos
<boomshroom> Nix can have an alternate config directory and still be able to use most of the existing packages right? Because the proot doesn't mount and writable /etc
noqqe has quit [Ping timeout: 260 seconds]
n0qqe is now known as noqqe
<boomshroom> Is it safe having proot and non-proot installs sharing a store?
<boomshroom> What happens if an installation with a non-standard (non-proot) Nix tries using a remote builder configured with a different store path?
<boomshroom> Wow, proot really is slow.
<boomshroom> And building proot nix failed.
blankhart has joined #nixos
vidbina has quit [Ping timeout: 246 seconds]
blonkhart has joined #nixos
ryanartecona has joined #nixos
mbrgm has quit [Ping timeout: 246 seconds]
mbrgm has joined #nixos
Poca has joined #nixos
Sonarpulse has quit [Ping timeout: 276 seconds]
sigmundv has quit [Ping timeout: 260 seconds]
<boomshroom> proot taking to long and failing? Force a remote build!
dnovosel has joined #nixos
ryanartecona has quit [Quit: ryanartecona]
Poca has quit [Ping timeout: 240 seconds]
<boomshroom> How can I use nix upgrade-nix and get a nix that uses a local user configuration rather than a global config in /etc?
hakujin2 has joined #nixos
<boomshroom> Also, is it possible to use a proot nix as a remote builder?
hakujin2 has quit [Ping timeout: 276 seconds]
spear2 has joined #nixos
justanotheruser has quit [Ping timeout: 260 seconds]
justanotheruser has joined #nixos
Ridout has quit [Quit: Lost terminal]
logzet has quit [Remote host closed the connection]
risciii has joined #nixos
risciii has quit [Ping timeout: 276 seconds]
Synthetica has quit [Quit: Connection closed for inactivity]
<coconnor> I should really get remote building set up...
<coconnor> (that and figure out why a binary cache isn't being used.)
ottidmes has quit [Ping timeout: 264 seconds]
Poca has joined #nixos
timon37 has quit []
jbaum98 has joined #nixos
schoppenhauer has quit [Ping timeout: 248 seconds]
<jbaum98> is there a way to integrate cabal nix and emacs? i run emacs from within nix-shell generate by cabal2nix, but when flycheck runs it doesn't use ghc-options or extensions in the cabal file. i want to have a single declarative place where i write my ghc-options and extensions (the cabal file) that propagates. is there a way to do this?
<boomshroom> coconnor: Remote building is magically. ^_^
gillmanash has quit [Ping timeout: 256 seconds]
schoppenhauer has joined #nixos
gillmanash has joined #nixos
lukeadams[m] has joined #nixos
prismate has joined #nixos
prismate has quit [Quit: WeeChat 0.3.8]
Sonarpulse has joined #nixos
marusich has quit [Quit: Leaving]
marusich has joined #nixos
dnovosel has quit [Ping timeout: 276 seconds]
ashkitten has joined #nixos
<ashkitten> soooo, when is nix-env -qaP gonna be optimized for low-memory environments lol
<ashkitten> it's ridiculous to have out of memory errors when trying to query for a package
<ashkitten> i understand that 1GB of RAM is not that much, but this is a package manager for crying out loud
<dtz> does "nix search" work any better?
<dtz> it should at least once you're using a cache
<dtz> but I suppose it probably is about the same otherwise, dunno
<ashkitten> hmm i don't see where that's pointed to in the docs... it works, yeah
<ashkitten> the docs just say to use nix-env -qaP iirc
Poca has quit [Remote host closed the connection]
Rusty1_ has quit [Quit: Konversation terminated!]
Poca has joined #nixos
<dtz> you may be right! Which docs? And maybe they need updating :).
<ashkitten> i was looking at the nixos manual
<boomshroom> ashkitten: nix search is new in Nix 2.0, so it makes sense that the docs aren't updated
<ashkitten> ah i see, it's outlined in the nix manual
<dtz> quick testing suggests they're about the same, via "command time -v nix-env -qaP -f channel:nixos-unstable" and "command time -v nix search -f channel:nixos-unstable -u"
<dtz> but if using the cache it drops from like 950MB to 35MB haha
<ashkitten> ah yeah
<ashkitten> also it doesn't seem to run out of memory even when updating the cache
<dtz> oh, I forgot we have a GC --maybe search lets it clean up as it goes when under pressure? neat if so
<ashkitten> nope never mind i think it's swapping, goddammit
<ashkitten> suddenly got slow as a snail
<ashkitten> oh and my ssh connection dropped...
<ashkitten> this is great......
<dtz> errr so if I impose a limit on memory usage, 'nix search' seems to complete using much fewer resources but ... it prints out much fewer items (!) lol
* dtz investigates
<ashkitten> well that was fun i'm never doing that again
<dtz> hahaha
<ashkitten> gonna sleep, night
Izorkin has joined #nixos
<boomshroom> goodnight, ashkitten! Won't be long before I log off for the night too.
Lisanna has joined #nixos
Poca has quit [Ping timeout: 264 seconds]
<Lisanna> Why does `nix-repl> :b ({ arg ? null }: runCommand "test" {} ''touch $out;'')` fail?
zzamboni has joined #nixos
peterzky has quit [Quit: WeeChat 2.0]
<clacke[m]> Lisanna: This work for me: :b with import <nixpkgs> {}; runCommand "test" {} "touch $out;"
<Lisanna> clacke[m] I'm sure it does :p the important bit is the fact that it's a lambda
<Lisanna> I get "error: expression does not evaluation to a derivation, so I can't build it"
<clacke[m]> How did it not work for you? You got the "error: expression does not evaluate to a derivation, so I can't build it" ?
<Lisanna> Look at my code
<Lisanna> { arg ? null }:
<Lisanna> putting that in front of it makes it fail
<Lisanna> but I don't understand why.
<clacke[m]> yes
<clacke[m]> because now it's a function
<clacke[m]> nix-build would automatically call it but repl doesn't
<clacke[m]> :b ({ arg ? null }: runCommand "test" {} ''touch $out;'') {}
<clacke[m]> works
<Lisanna> ...that's silly
<clacke[m]> (provided that you have loaded <nixpkgs> so that runCommand is a thing)
<clacke[m]> Yeah, it seems a bit strange to have differing semantics between build and `:b`
<Lisanna> OK, nix-build works, but only to one layer deep
<Lisanna> `with import <nixpkgs> {}; { arg2 ? null }: { arg ? null }: runCommand "test" {} ''touch $out;''`
<Lisanna> this fails
<clacke[m]> sure
<clacke[m]> Maybe it should be calling every lambda until it lands in something not a lambda
<clacke[m]> but one level is the common use case
<clacke[m]> It's a bit of a balance. Too much helpfulness can obscure mistakes too, and then there might be some other situation where one gets a bigger surprise.
<Lisanna> tbh it sounds like a bug... no reason why it can't go more than one layer
<Lisanna> I can probably work around it for now... but still annoying
<clacke[m]> I don't see that obviously being the case with just peeling off lambdas in a user-facing tool though.
<Lisanna> Err, what do you mean?
<Lisanna> If there's a derivation at the end of some nested lambda chain, why wouldn't I want it?
<clacke[m]> I mean, given that it's a user-facing tool (both repl and nix-build) rather than an internal API, I don't see that it being helpful and calling lambdas until it reaches a derivation would cause any obvious problem. So I agree with you.
<Lisanna> Alright
Fare has joined #nixos
MercurialAlchemi has joined #nixos
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nixos
zzamboni has quit [Client Quit]
Sonarpulse has quit [Ping timeout: 276 seconds]
zzamboni has joined #nixos
Guanin has quit [Ping timeout: 246 seconds]
blonkhart has quit [Quit: WeeChat 1.9.1]
zzamboni has quit [Ping timeout: 240 seconds]
<boomshroom> Is it possible to build NixOS for a foregn platform, or is it x86_64 only at the moment?
<boomshroom> On a related note, what kind of documentation is there for the mechanics behind the core of NixOS.
<boomshroom> Other than just Nix itself.
Guanin has joined #nixos
<Fare> Is there a simple way to tell nixos to reboot in an earlier version the next time, without requiring interaction at boot? (for a linode vm)
<boomshroom> Fare: nixos-rebuild boot --rollback
<Fare> boomshroom, thanks!!
<boomshroom> Fare: No problem! It's getting late though, so I'll be logging off. Good night!
boomshroom has quit [Quit: WeeChat 2.0]
endformationage has quit [Quit: WeeChat 1.9.1]
reinzelmann has joined #nixos
reinhardt has quit [Quit: Leaving]
eliaslfox has joined #nixos
<Fare> it worked! thanks a lot.
eliaslfox has quit [Ping timeout: 276 seconds]
hyper_ch2 has joined #nixos
ma27 has joined #nixos
JosW has joined #nixos
maximiliantagher has joined #nixos
ma27 has quit [Ping timeout: 246 seconds]
Fare has quit [Ping timeout: 246 seconds]
maximiliantagher has quit [Ping timeout: 240 seconds]
alex`` has joined #nixos
hakujin2 has joined #nixos
chrisbarrett has joined #nixos
hakujin2 has quit [Ping timeout: 252 seconds]
rauno has joined #nixos
davidlt_ has joined #nixos
zzamboni has joined #nixos
zzamboni has quit [Client Quit]
davidlt has quit [Ping timeout: 256 seconds]
zzamboni has joined #nixos
davidlt has joined #nixos
davidlt_ has quit [Ping timeout: 248 seconds]
zzamboni has quit [Read error: Connection reset by peer]
davidlt has quit [Read error: Connection reset by peer]
zzamboni has joined #nixos
zzamboni has quit [Client Quit]
zzamboni has joined #nixos
ottidmes has joined #nixos
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #nixos
mounty has joined #nixos
risciii has joined #nixos
jbaum98 has quit [Quit: Connection closed for inactivity]
mk-fg has quit [Ping timeout: 252 seconds]
davidlt has joined #nixos
robstr has joined #nixos
mk-fg has joined #nixos
mk-fg has quit [Changing host]
mk-fg has joined #nixos
alex`` has quit [Ping timeout: 240 seconds]
zzamboni has quit [Quit: Leaving.]
mk-fg has quit [Ping timeout: 264 seconds]
MichaelRaskin has quit [Quit: MichaelRaskin]
rauno has quit [Ping timeout: 264 seconds]
vidbina has joined #nixos
civodul has joined #nixos
Tucky has joined #nixos
<cnu-> Can you recommend a build system (for building a single package) similar to Nix?
aminb_ is now known as aminb
rauno has joined #nixos
<vaibhavsagar> cnu-:how do you want it to be different to Nix?
<cnu-> I didn't know you could use Nix for building single packages
ashgillman has joined #nixos
<hyper_ch2> Mic92: hmmm, still can't see the sqlite patch in nixos unstable small... it's been more than a week now.
<Mic92> hyper_ch2: `git branch -r --contains=fe5f012d074e9d7fb332288b53bd90b8587bf134` to see when it is merged into master. I am not involved in this process, so please stop asking me that.
<Lisanna> omg nix has absolutely no concept of limited memory availability
<Mic92> LnL: howoldis does not help here
<Mic92> the change is still in staging
<LnL> my point was that it hasn't updated in 9 days, so regardless of where it is it's probably not in the channel yet
<etu> LnL: hyper_ch2 said nixos-unstable-small which has been updated ;)
* LnL gets coffee
etu[m] has joined #nixos
bkchr has joined #nixos
<hyper_ch2> Mic92: thx
<hyper_ch2> wrote now a script to run 12-hourly to check
<Mic92> You know that you can override sqlite just for flexget instead?
<Mic92> whatever
<hyper_ch2> Mic92: I already did alter it locally... I just don't wanna pull any updates until it hits now unstable small
<Mic92> I know how you are doing that
la_putin has quit [Read error: Connection reset by peer]
<hyper_ch2> you probably do
<bkchr> Hi, I try to find the commit that broke a package with git bissect. It lead me to the following commit: https://github.com/NixOS/nixpkgs/commit/fced35fa440 I'm building kde systemsettings, but I don't have any ideas how this ruby fix could break a kde program. Does someone has an idea to print some sort of depdency graph and which depdency changes for a certain commit?
rogue_koder has quit [Quit: Konversation terminated!]
mk-fg has joined #nixos
mk-fg has quit [Changing host]
mk-fg has joined #nixos
ashgillman has quit [Ping timeout: 248 seconds]
ashgillman has joined #nixos
huxx has joined #nixos
paraseba has quit [Ping timeout: 276 seconds]
literon has joined #nixos
<literon> Good morning.
<literon> Nix newbie here. I'm using a single-user nix install on Debian. Now I wanted to use nixops, and get an error about nixosVersion not being found.
<literon> Now, I see some bugs about that attribute being renamed, and using overlays to fix it.
<literon> But I wonder if I can use nixops without NixOS at all?
<literon> system: "x86_64-linux", multi-user?: no, version: nix-env (Nix) 1.11.16, channels(ron): "nixpkgs-18.03pre130569.7a04c2ca296", nixpkgs: /home/ron/.nix-defexpr/channels/nixpkgs
paraseba has joined #nixos
ashgillman has quit [Ping timeout: 246 seconds]
<srk> literon: last time I've had this problem, nixops from master helped (on nixos though)
ashgillman has joined #nixos
<joepie91> literon: if I understand correctly, it's possible to use NixOps on a non-NixOS system, but it can only *manage* NixOS systems
coconnor has quit [Ping timeout: 246 seconds]
__Sander__ has joined #nixos
thc202 has joined #nixos
vidbina has quit [Ping timeout: 276 seconds]
<literon> Thank you. I used the overlay from alanz's comment in https://github.com/NixOS/nixops/issues/873 and it works (as in, no error on nixops info).
knupfer has joined #nixos
<literon> The trick was that the overlay needs to be put in ~/.config/nixpkgs/overlays (as stated), instead ~/.nixpkgs - which is the one I was used to.
<sphalerite> literon: ~/.nixpkgs is the legacy path, if you move it to ~/.config/nixpkgs it should continue working. But it doesn't really matter which you use
<literon> sphalerite, overlays were definitely not picked up from the old path.
knupfer has quit [Ping timeout: 248 seconds]
<{^_^}> Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/2469e7ef135 (from 2 hours ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
<sphalerite> literon: it might be that it checks ~/.nixpkgs for existence and if it does exist, completely ignores ~/.config/nixpkgs
<sphalerite> hm weird. pkgs/top-level/impure.nix doesn't refer to ~/.nixpkgs/overlays at all
davidlt_ has joined #nixos
<sphalerite> ooooh wait I misread what you wrote >.>
<sphalerite> yeah ~/.nixpkgs/overlays is never used, overlays were introduced after the switch to the XDG config path
davidlt has quit [Ping timeout: 246 seconds]
chrisbarrett has quit [Quit: chrisbarrett]
MP2E has quit [Remote host closed the connection]
ottidmes has quit [Quit: WeeChat 1.9.1]
palo has quit [Ping timeout: 240 seconds]
palo has joined #nixos
knedlsepp has quit [Quit: Konversation terminated!]
freeman42x]NixOS has joined #nixos
<tobiasBora> Hello,
<tobiasBora> I'd like to have several parrel versions of nix, can I somehome change an environment variable to change the folders of the user side configuration (.nix-* and .config/…/default.nix)
jtojnar has quit [Remote host closed the connection]
sigmundv has joined #nixos
<clever> tobiasBora: its generally better to just do import <nixpkgs> { config = import ./config.nix; }
<clever> tobiasBora: then it obeys ./config.nix and ignores ~/.config/nixpkgs/config.nix entirely
<clever> you can also replace <nixpkgs> with a fetchurl against a given revision, so it ignores $NIX_PATH
<aminechikhaoui> Folks can someone remind me what's the proper way for setting packages per user declaratively ?
<makefu> aminechikhaoui: users.users.<username>.packages
<aminechikhaoui> e.g I have a pkgs.vim_configurable.customize vim pkg in my configuration.nix that doesn't propagate to my user
<aminechikhaoui> unless I do nix-env -e vim then nix-env -i <path/to/custom_vim>
<makefu> users.users.myuser.packages = [ pkgs.vim_configurable.customize {} ]
newhoggy_ has joined #nixos
<makefu> with some brackets
<aminechikhaoui> makefu: I remember there is some ~/config/nixpkgs-something as well
<aminechikhaoui> but I'll try that as well
<makefu> ~/.config/nixpkgs is only for nix-env
<makefu> my example is applied in your configuration.nix
Guest38658 has joined #nixos
newhoggy has quit [Ping timeout: 248 seconds]
<aminechikhaoui> makefu: ah great
maximiliantagher has joined #nixos
newhoggy_ has quit [Ping timeout: 264 seconds]
jtojnar has joined #nixos
maximiliantagher has quit [Ping timeout: 263 seconds]
ottidmes has joined #nixos
<ottidmes> Any idea why nixos-rebuild still want to build my custom samba build, while I copied it over to the machine with nix copy --to? I can see them in the store, matching the exact hashes of those it wants to build
<aminechikhaoui> ottidmes: maybe the path isn't valid in the db
<aminechikhaoui> try nix path-info <path> --json
<ottidmes> aminechikhaoui: That is likely the problem: nix path-info /nix/store/id37hwdrja2l6q9l30bzn59vzndxfhx2-samba-4.7.6.drv --json gives [], while nix path-info /nix/store/ha3zbkmv0fvck3ckk88n94kcblq4iwac-samba-4.7.6 --json gives me a bunch of JSON
knupfer has joined #nixos
Guest38658 has quit [Quit: WeeChat 2.0.1]
<ottidmes> aminechikhaoui: Any idea how to fix? nix verify, maybe?
<aminechikhaoui> ottidmes: not sure but you can try nix verify
<aminechikhaoui> nix-store --repair-path migh help also
<aminechikhaoui> well it would work if you have the path in some binary cache
fendor has joined #nixos
jluttine has quit [Quit: WeeChat 2.0]
jluttine has joined #nixos
chrios_ has quit [Ping timeout: 246 seconds]
<ottidmes> aminechikhaoui: tried it, though I did not have the source nix store setup as a binary cache, it did not report anything either (verify)
chrios_ has joined #nixos
<ottidmes> aminechikhaoui: I will just do that, set it up as a binary cache, but I kind of expected nix copy to work as well
<WilliamHamilton> hi, I'd like some help as I cannot do `sudo nixos-rebuild switch` anymore. I *think* the problem is present since the moment I installed the `nix-2.0` program, but I have since then uninstalled it, and I still have the problems: here's a transcript of the error: http://lpaste.net/363625
<aminechikhaoui> ottidmes: yeah quite weird it didn't work
<WilliamHamilton> unfortunately I cannot pinpoint from that error where the problem is
<ottidmes> WilliamHamilton: You are still on Nix 2.0 considering this "warning: unknown setting 'signed-binary-caches'"
<WilliamHamilton> ottidmes: how could I either 1) move to nix 2.0 and make things work 2) revert completely to Nix < 2.0?
robstr has quit [Remote host closed the connection]
<WilliamHamilton> hmm, I could try to reboot after having uninstalled nix-2.0, maybe
<ottidmes> WilliamHamilton: 1) Wait until 18.03 is actually released. 2) Go back to stable 17.09 or use nix.package = pkgs.nix1; (I believe)
robstr has joined #nixos
huxx has quit [Ping timeout: 240 seconds]
<ottidmes> WilliamHamilton: I would not recommend the last option, using nix 1.x while on unstable is probably not going to work or asking about trouble, since I believe that in unstable things are already expecting the use of nix 2.x
newhoggy has joined #nixos
<manveru> gchristensen: is ofborg using nix 2?
<ottidmes> WilliamHamilton: But someone on unstable might actually help you further, I only use the stable releases
<gchristensen> Mostly, what are you seeing?
<manveru> just wondering :)
robstr has quit [Ping timeout: 264 seconds]
<manveru> i don't know what the policy is for nix-2.0-only code in nixpkgs atm
newhoggy has quit [Remote host closed the connection]
pkill9 has joined #nixos
<manveru> but i assume it's fine?
<manveru> except for backports
newhoggy has joined #nixos
<gchristensen> I think 18.03 already requires it
<gchristensen> You can't build NixOS tests with nix 1 anymore
<gchristensen> I think this is a mistake but haven't really brought it up yet
<WilliamHamilton> ok, so reboot (obviously) didn't work, I didn't even know that 18.03 was out
<gchristensen> We should decide what we want and make ofborg enforce it
<ottidmes> gchristensen: I saw 18.03 appear in nixpkgs-channels, does this mean it is released (although not officially yet)?
<WilliamHamilton> strangely the command `nix-channel --list` doesn't return anything! I was on unstable and I don't know how that got removed
simukis has joined #nixos
<gchristensen> Not yet released
<WilliamHamilton> could it be the installation of nix-2.0? As I'm adding a channel now, which one should I add (I prefer unstable)?
<LnL> ottidmes: not released, but the channel exists now
<ottidmes> LnL: So it is in the release candidate phase or something :P
knupfer has quit [Remote host closed the connection]
<LnL> it's continuous, but yes kind of
freeman42x]NixOS has quit [Read error: Connection reset by peer]
<WilliamHamilton> I'd still like some help, though; I tried re-adding the unstable channel and rebuilding, and I still get the previous error
freeman42x]NixOS has joined #nixos
<timokau[m]> ottidmes: Development has been frozen and currently remaining build failures are fixed
<manveru> WilliamHamilton: what's your `sudo nix-channel --list`?
<manveru> root and you have different channels :)
<ottidmes> timokau[m]: Alright, awesome! It is a good thing they aim for no failures at each release, definitely worth the wait
jrolfs_ has joined #nixos
wrl_ has joined #nixos
<WilliamHamilton> manveru: nixos https://nixos.org/channels/nixos-unstable
<WilliamHamilton> but, right, I'll do a `sudo nix-channel --update` now
philipcristiano_ has joined #nixos
oscarduignan_ has joined #nixos
christiaanb_ has joined #nixos
Jackneilll has joined #nixos
brodul has quit [Ping timeout: 256 seconds]
jtojnar_ has joined #nixos
himmAllRight17 has joined #nixos
roconnor_ has joined #nixos
magnetop` has joined #nixos
Mercuria1Alchemi has joined #nixos
raxius has joined #nixos
aminechi1haoui has joined #nixos
slyfox_ has joined #nixos
magnetop` is now known as magnetophon`
seequ__ has joined #nixos
guibou_ has joined #nixos
acowley_ has joined #nixos
ben______ has joined #nixos
palo_ has joined #nixos
palo_ has quit [Changing host]
palo_ has joined #nixos
jeschli2 has joined #nixos
MarcWebe1 has joined #nixos
tylerjl has joined #nixos
<WilliamHamilton> manveru: after the update of the channel, things are a little different, in the sense that the build started, and I did not get the error immediately, but it still complains about the cache parameter, and so I don't get binary caches (it's compiling the nvidia drivers now)
danyc0_ has joined #nixos
jensens has joined #nixos
brodul has joined #nixos
lassulus_ has joined #nixos
kier_ has joined #nixos
shlevy_ has joined #nixos
otulp_ has joined #nixos
liny01 has joined #nixos
<manveru> i think nvidia drivers are always compiled?
fouric1 has joined #nixos
<manveru> because they're not distributable
guido has joined #nixos
electroc1t has joined #nixos
larsvm_ has joined #nixos
guido is now known as Guest42799
socksy_ has joined #nixos
anderslu1dstedt has joined #nixos
ottidmes has quit [Quit: WeeChat 1.9.1]
srdqty1 has joined #nixos
ertesx-w has joined #nixos
kriztw_ has joined #nixos
averell- has joined #nixos
logzet has joined #nixos
fiddlerwoaroof_ has joined #nixos
dejanr_ has joined #nixos
pbogdan_ has joined #nixos
jwynn6_ has joined #nixos
MercurialAlchemi has quit [*.net *.split]
wrl has quit [*.net *.split]
roconnor has quit [*.net *.split]
leothrix has quit [*.net *.split]
himmAllRight has quit [*.net *.split]
dejanr has quit [*.net *.split]
pbogdan has quit [*.net *.split]
mmlb has quit [*.net *.split]
slyfox has quit [*.net *.split]
Acou_Bass has quit [*.net *.split]
CrazedProgrammer has quit [*.net *.split]
erictapen has quit [*.net *.split]
shlevy has quit [*.net *.split]
ertes-w has quit [*.net *.split]
fouric has quit [*.net *.split]
oscarduignan has quit [*.net *.split]
philipcristiano has quit [*.net *.split]
christiaanb has quit [*.net *.split]
octe has quit [*.net *.split]
raxius_ has quit [*.net *.split]
kier has quit [*.net *.split]
seequ has quit [*.net *.split]
NickHu_ has quit [*.net *.split]
averell has quit [*.net *.split]
sebboh has quit [*.net *.split]
so has quit [*.net *.split]
zemm has quit [*.net *.split]
ben has quit [*.net *.split]
danyc0 has quit [*.net *.split]
ertesx-w is now known as ertes-w
oscarduignan_ is now known as oscarduignan
philipcristiano_ is now known as philipcristiano
christiaanb_ is now known as christiaanb
troydm1 has joined #nixos
<WilliamHamilton> I was probably mistaken then, more so because it just finished building, and that wasn't enough time to recompile anything big. So, I still have the `warning: unknown setting 'signed-binary-caches'` that I'd like to remove, but all goes through now :)
<manveru> oh, it's unfree but redistributable, strange
averell- is now known as averell
erictapen has joined #nixos
knupfer has joined #nixos
mmlb has joined #nixos
Profpats1 has joined #nixos
maurer1 has joined #nixos
hiroshi- has joined #nixos
jluttine has quit [Quit: WeeChat 2.0]
Acou_Bass has joined #nixos
silver_hook_ has joined #nixos
jluttine has joined #nixos
fiddlerwoaroof has quit [Ping timeout: 260 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
acowley has quit [Ping timeout: 260 seconds]
blankhart has quit [Ping timeout: 260 seconds]
hiroshi has quit [Ping timeout: 260 seconds]
badi has quit [Ping timeout: 260 seconds]
Profpatsch has quit [Ping timeout: 260 seconds]
jwynn6 has quit [Ping timeout: 260 seconds]
MarcWeber has quit [Ping timeout: 260 seconds]
aminechikhaoui has quit [Ping timeout: 260 seconds]
srdqty has quit [Ping timeout: 260 seconds]
lsyoyom has quit [Ping timeout: 260 seconds]
guibou has quit [Ping timeout: 260 seconds]
otulp has quit [Ping timeout: 260 seconds]
maurer has quit [Ping timeout: 260 seconds]
raving has quit [Ping timeout: 260 seconds]
palo has quit [Ping timeout: 260 seconds]
magnetophon has quit [Ping timeout: 260 seconds]
troydm has quit [Ping timeout: 260 seconds]
electrocat has quit [Ping timeout: 260 seconds]
ToxicFrog has quit [Ping timeout: 260 seconds]
jeschli1 has quit [Ping timeout: 260 seconds]
guido_ has quit [Ping timeout: 260 seconds]
larsvm has quit [Ping timeout: 260 seconds]
lassulus has quit [Ping timeout: 260 seconds]
jtojnar has quit [Ping timeout: 260 seconds]
Jackneill has quit [Ping timeout: 260 seconds]
silver_hook has quit [Ping timeout: 260 seconds]
anderslundstedt has quit [Ping timeout: 260 seconds]
flugsio has quit [Ping timeout: 260 seconds]
badi has joined #nixos
socksy has quit [Ping timeout: 260 seconds]
kriztw has quit [Remote host closed the connection]
srhb has quit [Quit: Quit]
oscarduignan has quit [Changing host]
philipcristiano has quit [Changing host]
philipcristiano has joined #nixos
oscarduignan has joined #nixos
christiaanb has quit [Changing host]
christiaanb has joined #nixos
larsvm_ has quit [Changing host]
larsvm_ has joined #nixos
otulp_ is now known as otulp
hiroshi- is now known as hiroshi
ToxicFrog has joined #nixos
NickHu_ has joined #nixos
so has joined #nixos
jtojnar_ is now known as jtojnar
<manveru> ah, that warning is normal
CrazedProgrammer has joined #nixos
octe has joined #nixos
zemm has joined #nixos
<manveru> it's deprecated, but should be gone after your first upgrade because the nix.conf will be replaced
raving has joined #nixos
<WilliamHamilton> manveru: oh, good to know, thanks!
flugsio has joined #nixos
<jluttine> is there something like lua.withPackages? i'd need to add some lua dependencies to my weechat closure
srhb has joined #nixos
sebboh has joined #nixos
thblt has quit [Ping timeout: 264 seconds]
Shados has quit [Ping timeout: 252 seconds]
knupfer has quit [Ping timeout: 240 seconds]
Shados has joined #nixos
<the-kenny> Anyone having tips on how to deploy Elixir applications using distillery (or simply Erlang applications using releases?). It's tricky when deploying to a non-nixos server as the included erlang runtime systemd won't work because the binaries are patched for NixOS.
<the-kenny> Not including erts is tricky too as the compiled files need the exact same erts version on the target machine to work.
silver_hook_ is now known as silver_hook
silver_hook has quit [Changing host]
silver_hook has joined #nixos
peterzky has joined #nixos
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
newhoggy has quit [Remote host closed the connection]
<tokudan[m]> could someone merge the pull requests for firefox-bin #36921, #36922 and #36923, please?
raynold has quit [Quit: Connection closed for inactivity]
<{^_^}> Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/4b721968742 (from 2 days ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
literon has quit [Ping timeout: 252 seconds]
<tilpner> How can I change the mode of the home directory of a system user? (I suspect it's not configurable and locked to 700)
marusich has quit [Ping timeout: 276 seconds]
iyzsong has joined #nixos
reinzelmann has quit [Ping timeout: 264 seconds]
marusich has joined #nixos
newhoggy has joined #nixos
reinzelmann has joined #nixos
maurer1 is now known as maurer
shlevy_ is now known as shlevy
<infinisil> tilpner: chmod?
<tilpner> infinisil - I think it's reset on every boot
<clever> tilpner: what is that path?
<tilpner> /var/lib/syncthing
reinzelmann has quit [Quit: Leaving]
<tilpner> update-users-groups.pl sets permissions to 700 when the user home doesn't exist, but that shouldn't trigger here
<clever> there is no check in there to see if it doesnt exist
<clever> just that createHome is set to true
<tilpner> make_path($u->{home}, { mode => 0700 }) if ! -e $u->{home};
<clever> ahh
<tilpner> Isn't that a postfix if?
<infinisil> tilpner: Maybe a better solution would be for the service to not use its home directory, but rather to not have a home at all and use an arbitrary directory for its stuff
<clever> silly perl and its weird if statements
orivej has joined #nixos
<clever> tilpner: you can add a prestart script to the service
<infinisil> or maybe just this script should be changed
<tilpner> infinisil - The module sets a home, I have no control over that
<clever> tilpner: systemd.services.<name>.preStart
<clever> tilpner: you can set this from configuration.nix, and it will be sanely merged in
<clever> and it gets ran as root, so it can chmod things
<tilpner> That's sort of a hack :/
<clever> systemd.services.syncthing.preStart = "chmod 777 /var/lib/syncthing";
<clever> the syncthing module can also be updated to chmod it to a value you enter into the config
<infinisil> clever: 777? Doesn't that give rw permission to everybody?
<clever> infinisil: just an example value
iyzsong has quit [Ping timeout: 252 seconds]
<tilpner> I don't want a syncthing specific solution, the solution should work with any user. So I tried setting it from an activation script after the user activation snippet
<tilpner> And that works! But only when I run /run/current-system/activate manually, not after booting
<tilpner> But maybe there should be an official way to set a users homedir permissions?
robstr has joined #nixos
<infinisil> Yeah that sounds reasonable
<etu[m]> Nobody feel like looking at my gitea-postgres database setup PR? :) https://github.com/NixOS/nixpkgs/pull/36924
<infinisil> tilpner: Is the thing you need to do set g+rw?
<infinisil> It makes the most sense to want that, could be a nixos option `user.users.foo.allowGroupAccess = true`
newhoggy has quit [Remote host closed the connection]
<fearlessKim[m]> I was wondering why neomake nix maker stopped working. It seems it can't parse the CSI displayed by nix-instantiate. Is there a flag to turn that off ? (shouldn't it detect it's not running in a tty in the first place ?)
<tilpner> infinisil - Yes, I want g+rwx
newhoggy has joined #nixos
<infinisil> tilpner: (Maybe g+rwX would be better though)
<tilpner> What's the difference?
aarvar has quit [Ping timeout: 248 seconds]
<fearlessKim[m]> jluttine: there is work on it https://github.com/NixOS/nixpkgs/pull/33903
<tilpner> Ah, yes, that would be better
robstr has quit [Ping timeout: 240 seconds]
<infinisil> Can't remember exactly, but I remember being told X is often what you really want
<infinisil> Ah
<infinisil> Yeah, only gives the files exec that already have exec
<tilpner> I looked up. It doesn't change anything here, but it better shows the intent
<infinisil> Yeah
<electroc1t> is there a way to configure systemd wide .Xresources values?
Mateon3 has joined #nixos
<clever> electroc1t: not directly, the file on 20-28 isnt expandable, but you can use services.xserver.displayManager.sessionCommands = "${xorg.xrdb}/bin/xrdb -merge ${./yourfile}"; to just inject more things in
<jluttine> fearlessKim[m]: thanks!
Mateon1 has quit [Ping timeout: 276 seconds]
Mateon3 is now known as Mateon1
newhoggy has quit [Ping timeout: 260 seconds]
<infinisil> I should really don't get distracted by IRC all the time
<infinisil> This just reminded of wanting to write a DNS module
<infinisil> But i really should do more for university, kinda been slacking already
<sphalerite> infinisil: iktf… just too much stuff that's more interesting
<infinisil> Yeah.. I have so many interesting ideas and projects to do in my free time..
Rusty1_ has joined #nixos
<fendor> since yesterday, nix-collect-garabge removes all my applciations
<srk> infinisil: +1 for dns module! :D
<srk> infinisil: for which daemon?
<infinisil> srk: bind
reinzelmann has joined #nixos
<srk> +2!
<infinisil> but I think the dns syntax is pretty much universal
<infinisil> srk: Don't encourage me! I got studies to do!
<srk> universally bad :)
JosW has quit [Quit: Konversation terminated!]
<srk> infinisil: will help with testing :D
<infinisil> Mainly because I got frustrated trying to these damn records right
<infinisil> trying to get*
<infinisil> And nix can encode all those stupid SPF, DMARK, DKIM, what have you not records
<srk> will require a generator, I was looking at some and found some python gens/parsers IIRC
<infinisil> Would just write it in nix, it's not that bad
<clever> infinisil: oh, one min
<srk> :D
<clever> these scripts deal with creating forward and reverse dns records
<clever> for both v4 and v6
jtojnar has quit [Ping timeout: 256 seconds]
<infinisil> Yeah well A and AAAA records are easy
<clever> infinisil: try a PTR record
<infinisil> PTR is a bit harder yeah, my module would encode ip addresses as lists of integers, so it could reverse them easily
<clever> infinisil: 2607:f8b0:4006:819::200e has to be turned into e.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.9.1.8.0.6.0.0.4.0.b.8.f.7.0.6.2.ip6.arpa
<clever> have fun doing that in nix :P
<srk> filter / map.. :D
<infinisil> Well I already wrote an ipv4 type that only accepts valid ipv4 strings or lists of 4 integers
<{^_^}> Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/893b69a54cb (from 45 minutes ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
<infinisil> and returns a list of 4 integers
<clever> srk: the :: in the middle expands to a non-fixed number of 0's
<srk> yeah, that's a bit tricky
<clever> srk: so you have to expand it until the total length is right
<infinisil> Yeah Ipv6 will be a bit more trouble
<infinisil> But should be doable
<clever> i wrote a c++ prog you run via IFD that handles it
hlolli has joined #nixos
<infinisil> clever: There can only be one "::", right?
<clever> infinisil: correct
<infinisil> Yeah that's doable in nix
risciii has quit [Quit: Quit]
<infinisil> Damn I already got distracted again, actually trying to solve some homework here
<clever> lol
risciii has joined #nixos
<gchristensen> infinisil: take care of yourself, Nix can wait :P
<infinisil> And btw, here is the ipv4 type if anybody is interested: https://github.com/Infinisil/system/blob/master/new-modules/servers/bind.nix#L14-L22
<infinisil> I'm gonna disconnect my IRC client now and disable push notifications to my phone :)
jtojnar has joined #nixos
<clever> lol
<hlolli> does someone have a nix config for forcing num-lock to be always enabled, and the num-lock key disabled (or function as something else)
robstr has joined #nixos
yegor] has joined #nixos
<LnL> clever: wut, is that what an ipv6 reverse lookup is supposed to look like?
<yegor]> is there a nix built-in that returns string with current directory?
spear2 has quit [Remote host closed the connection]
<clever> LnL: yes
<clever> LnL: for ipv4, you flip the ip backwards, and each byte is a seperate segment, so you have to delegate the "subdomains" and if 2 people share a byte, somebody has to store both sets of answers
<clever> LnL: for ipv6, you flip it backwards, and each nibble (4 bits) is a segment, less need to share a dns server
<sphalerite> yegor]: I don't think so. Why do you want to do that?
newhoggy has joined #nixos
jsoo has joined #nixos
<clever> and with the sheer size, you have even less reason to share a nibble
<yegor]> sphalerite: i think i found it, `builtins.getEnv "PWD"` works
<yegor]> i need it so that nix-shell picks up changes instead of placing everything in the nix store
<sphalerite> yegor]: that's probably not reliable
<clever> yegor]: builtins.toString ./.
<sphalerite> clever: that's not cwd, that's directory containing current file
<clever> ahhh, right
<yegor]> that's what i need, thank you a lot1
<LnL> clever: I expected it to be per segment, but that would probably just be even more confusing :p
<clever> yegor]: why do you need the working directory?
<yegor]> s/lot1/lot!/
<yegor]> you're right, i need directory containing current file
<clever> yegor]: what do you plan to do with that path?
<yegor]> clever: append it to NIX_PATH
<clever> yegor]: ah, if your in a shellHook you can just use $(pwd)
peterzky has quit [Quit: WeeChat 2.0]
jsoo has quit [Client Quit]
<yegor]> builtins.toString is better because it should be relative to shell.nix
<clever> ah yeah
maximiliantagher has joined #nixos
tertle||eltret has quit [Quit: Connection closed for inactivity]
newhoggy has quit [Remote host closed the connection]
newhoggy has joined #nixos
jtojnar has quit [Read error: Connection reset by peer]
maximiliantagher has quit [Ping timeout: 246 seconds]
jtojnar has joined #nixos
newhoggy has quit [Ping timeout: 240 seconds]
yegor] has quit [Quit: Page closed]
<srid> Does anyone have an example of how they have configured 'fzf-vim' vim plugin in neovim (all configured via nix)?
szicari has joined #nixos
zzamboni has joined #nixos
zzamboni has quit [Ping timeout: 240 seconds]
jtojnar has quit [Quit: jtojnar]
<manveru> srid: i'm using fzy if that helps...
knupfer has joined #nixos
jtojnar has joined #nixos
<tilpner> Can anyone please verify that master/nixos-18.03 fcgiwrap doesn't build?
<tilpner> I get configure: error: C compiler cannot create executables
<srid> manveru: I couldn't get it to work in vim (works in command line). Here's my nix configuration change: https://github.com/srid/mynixos/commit/9af38654e0dd9bab33d421ea092afc7f357f0fda ... can you spot anything wrong?
<manveru> hm
<tilpner> Uhh, this is embarassing. Ignore me, please
<manveru> rtp shouldn't point to the bin
<manveru> tilpner: it works here :)
zzamboni has joined #nixos
<tilpner> Thank you, but I found my mistake :)
<manveru> srid: did you read your generated vimrc?
<manveru> srid: less $(egrep -o '\S+vimrc' $(which nvim))
iyzsong has joined #nixos
ma27 has joined #nixos
<manveru> what you have to make sure is that fzf is in your PATH though
tilpner has quit [Remote host closed the connection]
<manveru> i don't think there's an easy way to add it to only nvim like we do for ruby and python already
<srid> I see: `let g:nix_plugin_locations['fzf-vim'] = "/nix/store/j7higay309r25d2qprd9b5p426n8nz56-vimplugin-fzf-vim-2018-01-09/share/vim-plugins/fzf-vim"`
<srid> Ya, fzf is already in my shell PATH
<manveru> ok, and what key did you bind the fzf function to?
<srid> manveru: This is the error I see from vim https://usercontent.irccloud-cdn.com/file/bW8rZj08/fzf%20vim%20error
<srid> ... when using the `Files` command
tilpner has joined #nixos
<LnL> srid: you don't have to configure anything AFAIK
<manveru> yeah, that's just strange
<LnL> srid: did you include fzfWrapper?
<manveru> well, here's my vim config if you want to have a look, but i'm using neovim-fuzzy instead of fzf because i like fzy matching better
zzamboni has quit [Remote host closed the connection]
zzamboni has joined #nixos
rauno has quit [Remote host closed the connection]
<srid> LnL: Oh I didn't. That was the problem, it works now!
babyflakes has joined #nixos
<LnL> yeah fzfWrapper is for :FZF and vim-fzf adds a bunch of extra commands/functions like :Buffers IIRC
<manveru> oh lol :D
<manveru> !m LnL
<[0__0]> You're doing good work, LnL!
hiroshi- has joined #nixos
<{^_^}> Channel nixpkgs-18.03-darwin advanced to https://github.com/NixOS/nixpkgs/commit/177e20c14e0 (from 40 minutes ago, history: https://channels.nix.gsc.io/nixpkgs-18.03-darwin)
hiroshi has quit [Ping timeout: 240 seconds]
hiroshi- is now known as hiroshi
<srid> I use `lib.readFile` in default.nix (to basically import my custom.vim, and embed it into neovim), and I noticed that when this file changes it doesn't cause `nix-build` to rebuild.
<srid> I'd have thought that readFile should automatically trigger a new build, but maybe I'm missing something
Synthetica has joined #nixos
<LnL> manveru: btw, are you using nix 2.0 in a container by any chance?
<manveru> uhm, yeah
<manveru> if you mean docker container
<LnL> I ran into a weird problem with $nix/libexec/buildenv
<LnL> 1.12 worked fine
<manveru> can't say i've had issues
fendor has quit [Ping timeout: 240 seconds]
<robstr> looking for a lightweight irc client, can someone help here ? :)
<clever> robstr: i use irssi, its curses based
<robstr> clever: learning curve is high ?
<clever> robstr: if you already navigate irc with commands, it should be easy, its just /join, /part, /connect, /server stuff
<infinisil> robstr: Well I also used irssi in the beginning, that is until i discovered weechat and realized it's so much nicer
humanoyd has joined #nixos
<infinisil> So my recommendation is weechat, it's got a lot of features, all in the terminal
<infinisil> clever: Have you ever used weechat?
<Lisanna> "AAAAAASomeThingsFailToEvaluate"
<Lisanna> 0.o
<gchristensen> you probably tried to install all of nixpkgs
<Lisanna> gchristensen ah, so that's what that's for :p
<clever> infinisil: ive used it recently, and have even written a weechat service for nixos, but i still use irssi as my primary client
<gchristensen> :D
<gchristensen> Lisanna: we used to get a lot of complaints "Why the heck is it trying to install AGDA!!! (the previosuly first broken package they'd hit) when I'm trying to get <<X>>???!!"
<gchristensen> so we added AAA... to make it obvious they're not trying to get agda, but just accidentally getting all of nixpkgs
<infinisil> gchristensen: Soo, what's up with nix-env allowing to install an attrset?
<infinisil> That seems like the real problem here
<clever> infinisil: i find that handy, i have a custom set of packages in my overrides, and i just nix-env -iA nixos.mystuff which is a set
<clever> infinisil: and each item is installed as a seperate entry, so i can still update just one
<infinisil> clever: but that should really be a list
<infinisil> just like systemPackages
<joepie91> gchristensen: but what if I want to install all of nixpkgs
<joepie91> :P
<infinisil> No need to allow attrsets
<gchristensen> joepie91: good luck!
zzamboni has quit [Quit: Leaving.]
<infinisil> Just like buildEnv takes a list of paths
<infinisil> derivations*
robstr_ has joined #nixos
<robstr_> indefini: ok I'm testing weechat now, ty :+1
<infinisil> highlight thief indefini at it again
<Lisanna> I have a path, and I'd like to call baseNameOf on it. How do I get it from a path to a derivation that I can call baseNameOf on?
alexteves has joined #nixos
<Lisanna> what I've tried so far: baseNameOf (lib.toDerivation (builtins.storePath ./myfile))
zzamboni has joined #nixos
<infinisil> Lisanna: Um.. `baseNameOf ./myfile`?
<infinisil> Oh you want the store path
ma27 has quit [Ping timeout: 252 seconds]
<indefini> infinisil: ?
<Lisanna> wait... is it really that simple
<clever> nix-repl> baseNameOf "${./math.nix}"
<clever> "jylc9ipi7icxdidi2payk0vpj1ibh5b2-math.nix"
<clever> nix-repl> baseNameOf ./math.nix
<clever> "math.nix"
<infinisil> indefini: whoa I've never seen you talk here, but people keep mentioning your name instead of mine because they start with the same 2 letters
knupfer has quit [Ping timeout: 240 seconds]
<Lisanna> clever oh, that's nice
<clever> Lisanna: also, why do you want that basename?
ma27 has joined #nixos
<infinisil> I bet Lisanna is at it again with meta nix stuff
<Lisanna> clever I actually just want the original filename
<clever> Lisanna: ah, then without the quotes is best
<Lisanna> infinisil shhh
robstr_ has quit [Client Quit]
robstr_ has joined #nixos
<indefini> infinisil: yes I figured :) I think I never talked here, I am just looking at discussions to learn more about nix
<infinisil> indefini: Cool ;)
knupfer has joined #nixos
<nh2[m]> which function can I use to make a symlink to another file?
erasmas has joined #nixos
shabius has quit [Remote host closed the connection]
shabius has joined #nixos
<clever> nh2[m]: in a derivation?
<nh2[m]> clever: yes, to another path in the nix store
<nh2[m]> I want something like this, but that makes a symlink to `${pkgs.elasticsearch}/config/somefile` instead of writing a file contents
<nh2[m]> so I was wondering if there's a helper function for it
<nh2[m]> so that's inside `buildEnv`
<clever> nh2[m]: i dont think there is, but you can use something like the wrapped i gave, to just make a symlink at any path pointing to any path
lord| has quit [Quit: WeeChat 2.0.1]
Neo-- has joined #nixos
leat has quit [Ping timeout: 264 seconds]
blankhart has joined #nixos
clojarq has joined #nixos
clojarq has quit [Client Quit]
Neo-- has quit [Ping timeout: 246 seconds]
Neo-- has joined #nixos
<robstr_> when pressing _copy to clipboard_ inside chromium for example on github, I just receive "Aw, Snap! something went wrong while displaying .." did someone see this too ?
<nh2[m]> clever: ah I could also imply do it in the `postBuild` just below where it does `mkdir`
periklis has joined #nixos
peterzky has joined #nixos
leotaku has joined #nixos
Neo-- has quit [Read error: Connection reset by peer]
leotaku has quit [Client Quit]
Neo-- has joined #nixos
leotaku has joined #nixos
<woffs> Hi. How to enable ntfs3g in a way that udisksd uses it instead of ntfs?
detran has joined #nixos
spietz has joined #nixos
knupfer has quit [Ping timeout: 260 seconds]
Neo-- has quit [Read error: Connection reset by peer]
leotaku has quit [Ping timeout: 240 seconds]
Neo-- has joined #nixos
<manveru> robstr_: doesn't that need flash?
<robstr_> manveru: I have no idea, I dont think so
<Yaniel> I think there is a html5 api now
spietz has quit [Quit: WeeChat 1.9.1]
<Yaniel> well, javascript ap of course
<manveru> yeah, well, the button works here
<manveru> but i'm on chrome, not chromium
<manveru> and firefox also works
<robstr_> hmm
leotaku has joined #nixos
WizBright has joined #nixos
<clever> nh2[m]: yeah, that should work
<clever> robstr_: does dmesg say anything?
reinzelmann has quit [Quit: Leaving]
<mguex> clever: how much effort do you think nix #1256 is? It should be pretty straight forward, right?
<robstr_> clever: no, nothing
<clever> robstr_: nothing at all?
<robstr_> clever: nothing new
<clever> robstr_: strange
<clever> mguex: there will need to be support for multiple bi-directional channels, similar to how the stdout is forwarded to the client
<clever> mguex: and then opening a unix socket inside the sandbox, and forwarding things both ways, along the nix protocol
leotaku has quit [Client Quit]
Neo--- has joined #nixos
Neo-- has quit [Ping timeout: 240 seconds]
mkoenig has quit [Ping timeout: 264 seconds]
foldingcookie has joined #nixos
leotaku has joined #nixos
Neo--- has quit [Remote host closed the connection]
Neo--- has joined #nixos
bkchr has quit [Ping timeout: 248 seconds]
ryanartecona has joined #nixos
Neo--- has quit [Ping timeout: 240 seconds]
zzamboni has quit [Quit: Leaving.]
mkoenig has joined #nixos
<foldingcookie> hi, I have a few questions about nixos which I've just installed... first one is really dumb: how do I get shell scripts with #!/bin/bash to run?
<symphorien> replace this by #!/usr/bin/env bash
<symphorien> or if it doesn't use bash-isms, then /bin/sh
<foldingcookie> no, I mean how can I configure my system to run them
<foldingcookie> it doesn't seem practical to rewrite every shell script in the universe
<foldingcookie> well, non-sh shell script
<goibhniu> you can symlink /bin/bash if you like
<goibhniu> to /run/current-system/sw/bin/bash
<LnL> aaah
<robstr_> I think foldingcookie means on startup
<robstr_> ?
zzamboni has joined #nixos
<foldingcookie> that symlink seems to work
<foldingcookie> robstr_: I had only tried in interactive situations, but presumably a symlink there should work universally?
Neo--- has joined #nixos
Sonarpulse has joined #nixos
<foldingcookie> (unless things have version pickiness, but things usually don't for bash)
leotaku has quit [Ping timeout: 265 seconds]
<robstr_> foldingcookie: I'm new to nixos too :+1 - I misunderstood your question first
<foldingcookie> second question: how can I track things like wpa-supplicant.conf and symlinks of this sort, which aren't handed by modifications to the system .nix files?
<nh2[m]> clever: regarding `runCommand` you mentioned, is there a benefit of passing in an `env` vs string-interpolating the variable, like is done here? https://github.com/NixOS/nixpkgs/blob/b7e51bf4ffb57197639c8ab3c7627973538910a6/nixos/modules/services/logging/logstash.nix#L43
<clever> nh2[m]: no real difference
<clever> nh2[m]: though .overrideDerivation can modify it, the way you linked
<robstr_> foldingcookie: https://github.com/rycee/home-manager maybe check this
<clever> which may be handy for more complex things when you cant just copy/paste the whole command
<foldingcookie> robstr_: these things don't relate to my user home directory, though
<nh2[m]> I see
leotaku has joined #nixos
tilpner_ has joined #nixos
tilpner has quit [Ping timeout: 264 seconds]
Mercuria1Alchemi has quit [Ping timeout: 264 seconds]
<foldingcookie> also, it seems like it takes a very long time for "nix-env -i foo" to get around to actually downloading foo
tilpner_ is now known as tilpner
<foldingcookie> what's happening here, and is there some way to speed it up?
<clever> !-A
<{^_^}> You'll usually want to use nix-env -i with -A. It's faster and more precise. See https://nixos.wiki/wiki/FAQ/nix-env_-iA for details.
<foldingcookie> ok cool, I had wondered what was going on with -A vs not
Neo-- has joined #nixos
<foldingcookie> still seems very strange for a search to take that long, though... it's just scanning a list, not running a SAT solver or something?
<foldingcookie> or does it have to consult a poor overloaded server somewhere
<clever> foldingcookie: it has to evaluate every package in nixpkgs, which requires reading all the default.nix files, and running all the expressions, on your machine
<clever> foldingcookie: and once it has done that, it has to check every .narinfo file on cache.nixos.org for the outputs your missing, to figure out what it can download
Neo--- has quit [Ping timeout: 248 seconds]
Avaq has joined #nixos
<foldingcookie> ah, I guess I don't quite grasp the model here yet
<foldingcookie> thanks for the explanation
<Avaq> Hello everybody. I just noticed my /tmp folder hasn't been cleared for over a year. Is there anything I have to do with NixOS to get it to periodically remove temporary files? A quick internet search turned up nothing.
leat has joined #nixos
<tilpner> Avaq - boot.cleanTmpDir = true;
<Avaq> Great! :D
<foldingcookie> alternatively you can use tmpOnTmpfs, right?
<tilpner> That only works if you periodically reboot
civodul has joined #nixos
Neo--- has joined #nixos
<Avaq> I do occasionally reboot, mostly because I haven't figured out an easier way to reapply my `xset` stuff after upgrading.
Neo-- has quit [Ping timeout: 260 seconds]
<symphorien> Avaq: if I understand correctly what you mean by after upgrading, look at https://nixos.org/nixos/options.html#activationscr
alhariel has joined #nixos
Neo--- has quit [Read error: Connection reset by peer]
<Avaq> symphorien: I have `xserver.displayManager.sessionCommands = '${pkgs.xlibs.xset}/bin/xset r rate 230 65'`, but on some occasions after a `nixos-rebuild switch`, my cursor will slow back down. A reboot fixes it.
<gchristensen> can somoene on Nix 2 try `nix-store -r /nix/store/bm7pb1s7rx1ad80706b5xqrznq7fgpgx-gcc-7.3.0`?
<symphorien> nixos-rebuild switch doesn't touch X sessions
newhoggy has joined #nixos
<hodapp> I used to have the bad habit of messing with boot settings, trying a new kernel, manually booting the system via GRUB by putting in correct parameters, and then forgetting that I needed to add these settings persistently
<hodapp> and then not rebooting for months...
<symphorien> so it won't fire the command again
<Avaq> But somehow it does reset it to defaults.
<Avaq> It's not a problem. It happens infrequently enough for me not to mind the reboots.
<Avaq> And now with cleanTmpDir, it's actually beneficial to reboot once in a while. ;)
<Avaq> On a different note, does anybody know why the unstable channel appears not to have received any updates for like two weeks?
<clever> gchristensen: that storepath is already valid in my laptop
<gchristensen> hrm
<gchristensen> I can't realize it
<clever> and desktop
wrl_ is now known as wrl
<Avaq> clever: oh
<clever> gchristensen: running NIX_REMOTE=local?root=/tmp/fakestore nix-store -r /nix/store/bm7pb1s7rx1ad80706b5xqrznq7fgpgx-gcc-7.3.0
<clever> gchristensen: heh, it snuck over to my desktop and stole a copy from that machine, lol
<gchristensen> lol
<clever> and the desktop is stealing a copy off the router!
<clever> my caching is setup too well
<LnL> :D
<clever> NIX_CONF_DIR=/home/clever NIX_REMOTE=local?root=/tmp/fakestore nix-store -r /nix/store/bm7pb1s7rx1ad80706b5xqrznq7fgpgx-gcc-7.3.0
<clever> there, that disables nix.conf!
newhoggy has quit [Ping timeout: 268 seconds]
<clever> gchristensen: downloads from cache.nixos.org without trouble
<gchristensen> hrm
<gchristensen> thanks clever!
<Avaq> clever: So it seems nixos-unstable is lacking behind. Any idea why?
<clever> Avaq: click on the hydra job for it
<clever> Avaq: the graphical iso, ova image, and plasma5 tests have been failing because of a dependency
<clever> qtquickcontrols2 isnt building
<Avaq> Ah
<clever> but the build log shows no errors, and appears to be passing
<clever> gchristensen: do you have access?, can you try restarting the build? https://hydra.nixos.org/build/70719143
<gchristensen> I can
<gchristensen> done
<Barnabas[m]> Is there a straightforward way to limit the download bandwidth nix-build uses? Looks like curl has a --limit-rate option, but I'm not sure how to pass curl options through nix-build
knupfer has joined #nixos
<symphorien> a non straightforward way would be to use iptables to limit the bandwidth allocated to the nixbld unix group (if you use the daemon)
detran` has joined #nixos
knupfer has quit [Read error: Connection reset by peer]
coconnor has joined #nixos
Fare has joined #nixos
hakujin2 has joined #nixos
<infinisil> Who messed with feh's man pages..
<infinisil> Because they aren't there
<joko> Hello, could anyone help me override the kernel version on a system with old nixpkgs?
knupfer has joined #nixos
<infinisil> And I need them
<infinisil> git bisect to the rescue
<clever> joko: boot.kernelPackages = (import <nixpkgs2>{}).linuxPackages; would be a way to mix the new nixpkgs into an old nixos
<joko> I have tried with pkgs.linux_4_9.override { version = ...; src = ...;}, but no luck
detran has quit [Ping timeout: 240 seconds]
<joko> clever: I would prefer to avoid getting a new nixpkgs tree to keep disk space low, any other way?
<clever> joko: the kernel packages are complex, because nixpkgs needs to generate a set of module packages around the kernel
coot has quit [Quit: coot]
ma27 has quit [Quit: WeeChat 2.0]
<leotaku> does anyone here have any experience with packaging ruby/rake packages as nix-pkgs? I am currently trying to package subtlewm but am failing miserably.
<mguex> leotaku: how far are you? Have you already created a gemset.nix using bundix?
<leotaku> mguex: yes, but I am unsure about if I have done it correctly. subtle does not seem to have any non-optional gem dependencies, so it currently only contains rake
<gchristensen> dtz: 'round?
<fearlessKim[m]> joko: `I have tried with pkgs.linux_4_9.override { version = ...; src = ...;}, but no luck` what was the pb ?
digitus has joined #nixos
<joko> fearlessKim[m]: The nixpkgs version was getting pulled
<joko> fearlessKim[m]: overriding extraConfig works as intended, though
<leotaku> my current problem is getting subtle to find the "extensions?" it seems to provide. Running it currently fails because it can't seem to find some files.
<Barnabas[m]> symphorien: how hard would that be?
Fare has quit [Ping timeout: 264 seconds]
kreisys has joined #nixos
<symphorien> have you ever touched to iptables ?
<symphorien> there is a noticeable learning curve imo, but it would probably take 3 rules.
<Barnabas[m]> symphorien: I've used iptables before but not for rate limiting
magnetophon` has quit [Ping timeout: 240 seconds]
roconnor_ has quit [Ping timeout: 276 seconds]
maximiliantagher has joined #nixos
<symphorien> then with stack overflow it should be easy then
<{^_^}> Channel nixpkgs-18.03-darwin advanced to https://github.com/NixOS/nixpkgs/commit/e95d2412acf (from 58 minutes ago, history: https://channels.nix.gsc.io/nixpkgs-18.03-darwin)
<symphorien> and in man iptables-extensions lookup --gid-owner
<leotaku> mguex: any idea?
Myrl-saki has joined #nixos
michiel_l has quit [Remote host closed the connection]
marusich has quit [Quit: Leaving]
roconnor has joined #nixos
<foldingcookie> does anyone know anything about https://nixos.wiki/wiki/Using_X_without_a_Display_Manager ? e.g., what is xlaunch, what's the current status of this stuff, how would I go about getting startx to work?
<foldingcookie> at present the main issue I have seems to be that "startx" runs an X server that can't find xf86-video-intel and xf86-input-evdev modules since they're in different directories in the store
hyper_ch2 has quit [Quit: Page closed]
<kreisys> Hey does anyone know whether Nix does tail recursion optimization? I'm trying to figure out whether I should bother fixing my code or not? :P
<LnL> pretty sure it does, but be careful about space leaks since it's lazy
<infinisil> Can anybody tell me how man pages are supposed to be installed? The package feh contains the "man" output, and it does indeed contain the man pages, but I can't `man feh` anymore, but I know it worked in the past
<kreisys> gotcha. thanks!
endformationage has joined #nixos
<LnL> infinisil: define install :)
leotaku has quit [Ping timeout: 248 seconds]
leotaku has joined #nixos
<infinisil> LnL: Haha yeah, I just wanna find out why man pages don't work anymore
maximiliantagher has quit [Remote host closed the connection]
<infinisil> And even `nix-shell -p feh` doesn't install it with old nixpkgs versions
<infinisil> I guess the problem lies with man then?
<infinisil> I could try rollback to my previous system, I thought it worked there
maximiliantagher has joined #nixos
<infinisil> The amount of times man pages disappeared on me is too damn high
<joko> infinisil: This might be related to this: https://github.com/NixOS/nixpkgs/pull/35884
<Barnabas[m]> symphorien: thanks, i'll look into that
<infinisil> joko: I don't think so, it worked in the past
<infinisil> I remember opening the feh man page weekly
<joko> infinisil: are you on nixos-unstable?
<LnL> man finds stuff in a nix-shell in my experience
<infinisil> joko: yeah
<kreisys> infinisil: I can reassure you that it doesn't work on my system either :P
<infinisil> kreisys: That's reassuring
<infinisil> kreisys: only for feh? Does `nix-shell -p fzf` give you the fzf man page?
<LnL> infinisil: does it have multiple outputs or not?
<infinisil> LnL: It does, out, man and doc
<kreisys> afaik it should though... like I always do a 'nix-shell -p stdenv' when I want to read the manpage for gnu find for example (as opposed to the BSD find that comes with macos)
<leotaku> i don't know if this helps at all, but i can "man feh" just fine
maximiliantagher has quit [Ping timeout: 248 seconds]
<infinisil> leotaku: what's your nixos-version say?
<kreisys> infinisil: no luck with fzf. though I can *see* that it's installing the man portion
<LnL> infinisil: if you add it to systemPackages it should always work, that will include man outputs unless the man module is disabled
<kreisys> I think that might be specific to packages that split the manpages to a separate output?
<infinisil> LnL: I see i have it installed with nix-env
<infinisil> Which should also work just fine
<LnL> no, nix-env won't install other outputs
<infinisil> Huh
roberth has joined #nixos
<infinisil> You sure?
<infinisil> nix-env -iA nixos.feh.man
<infinisil> And it still doesn't work
<leotaku> infinisil: 18.03.git.cc4677c36ee (Impala)
<clever> infinisil: meta.outputsToInstall
<leotaku> I indeed do have feh in my systemPackages, so maybe that's why it works for me?
zzamboni has quit [Quit: Leaving.]
<LnL> infinisil: nix-env -iA nixos.feh.man will install nixos.feh.out
<clever> leotaku: one min
<infinisil> I'll try systemPackages, but really nix-env should work too
<LnL> unless that was fixed recently
<clever> leotaku: this augments systemPackages, so it installs the .man of every package
babyflakes has quit [Quit: Connection closed for inactivity]
<clever> but if you instead set programs.man.enable = false;, it omits all the man pages
<infinisil> LnL: Oh my god
<infinisil> Are you serious, an issue that doesn't install man pages with the so appreciated multiple-outputs doesn't get fixed for a year ?
newhoggy has joined #nixos
<LnL> feel free to jump in :)
magnetophon` has joined #nixos
jensens has quit [Ping timeout: 276 seconds]
<infinisil> systemPackages does indeed work
blankhart has quit [Read error: Connection reset by peer]
blankhart has joined #nixos
Slabity has joined #nixos
newhoggy has quit [Ping timeout: 240 seconds]
maximiliantagher has joined #nixos
coconnor has quit [Remote host closed the connection]
<Slabity> Anyone know a quick way to install a package with `nix-env`, but just change the src url?
<Slabity> I'd prefer not writing a whole file for something that small
<infinisil> LnL: Hmm yeah
<LnL> but for nix-env that would be on a per package basis
<infinisil> Well the fix is apparently merged to staging now
<clever> Slabity: nix-env -i -E '{ ... }: with import <nixpkgs> {}; hello.overrideDerivation (drv: { src = fetchurl { ... }; })'
<clever> Slabity: i think
rogue_koder has joined #nixos
maximiliantagher has quit [Remote host closed the connection]
maximiliantagher has joined #nixos
<infinisil> I'm just wondering why the feh manpage worked all this time
<infinisil> Oh because it might have been split into the multiple outputs, right
<infinisil> recently
<clever> probably
<clever> i recently made a PR to split rocksdb up, the static and dynamic libraries where in the same output as the headers!
hlolli has quit [Quit: Leaving]
blankhart has quit [Ping timeout: 240 seconds]
Myrl-saki has quit [Ping timeout: 264 seconds]
maximiliantagher has quit [Ping timeout: 240 seconds]
<Slabity> clever: I feel like whenever I have a question you're always the one to answer :b
Myrl-saki has joined #nixos
<Slabity> But that did work, thanks a lot.
<foldingcookie> asking again, does anyone know anything about https://nixos.wiki/wiki/Using_X_without_a_Display_Manager ? e.g., what is/how do I install xlaunch, where are more docs, what's needed for startx to work? presently startx seems to run an X that can't find xf86-video-intel/xf86-input-evdev modules (since they're in different directories in the store)
coconnor has joined #nixos
<leotaku> sorry for repeating myself, but does anyone here know how one should package ruby/rake programmes? I do not programm in ruby myself, so I might be missing something really obvious.
ma27 has joined #nixos
<coconnor> leotaku: have you read through https://nixos.org/nixpkgs/manual/#sec-language-ruby ?
Tucky has quit [Remote host closed the connection]
blankhart has joined #nixos
periklis has quit [Ping timeout: 264 seconds]
Avaq has quit [Quit: Leaving.]
humanoyd has quit [Quit: WeeChat 2.0.1]
cfricke has joined #nixos
<leotaku> coconnor: yes, I have done that
chisui has joined #nixos
loonquawl has joined #nixos
hakujin2 is now known as hakujin
cfricke has quit [Client Quit]
sebboh has quit [Changing host]
sebboh has joined #nixos
vidbina has joined #nixos
alex`` has joined #nixos
paraseba_ has joined #nixos
iyzsong has quit [Ping timeout: 240 seconds]
ottidmes has joined #nixos
Ariakenom has joined #nixos
Ariakenom has quit [Client Quit]
__Sander__ has quit [Quit: Konversation terminated!]
Ariakenom has joined #nixos
Ariakenom has left #nixos [#nixos]
Ariakenom has joined #nixos
raynold has joined #nixos
<electroc1t> hey, how do i make <nixpkgs> default to .nix-defexpr instead of the root channel
<electroc1t> do i have to set NIX_PATH manually?
Ariakenom has quit [Client Quit]
Ariakenom has joined #nixos
<electroc1t> foldingcookie: i wish people had documented this, some have figured out how to do this but i cant find it anywhere
detran` has quit [Remote host closed the connection]
Ariakenom has quit [Client Quit]
detran` has joined #nixos
Ariakenom has joined #nixos
John882 has joined #nixos
Ariakenom has quit [Client Quit]
Ariakenom has joined #nixos
hotfuzz has joined #nixos
newhoggy has joined #nixos
<tilpner> Would making .nix-defexpr default to <nixpkgs> work too for you?
hotfuzz_ has quit [Ping timeout: 276 seconds]
<clever> [clever@amd-nixos:~]$ cat .nix-defexpr/test/foo/default.nix
<clever> import /home/clever/apps/nixpkgs
<clever> tilpner: this creates a foo channel, so i can nix-env -iA foo.hello
maximiliantagher has joined #nixos
<tilpner> echo "import <nixpkgs> {}" > .nix-defexpr/nixpkgs.nix
<clever> tilpner: i think you need to drop the {}
<tilpner> clever - I know, you've told me like five times :)
<clever> nix-env expects it to return a function
<tilpner> And no, this works
<clever> though that breaks nix-env -iA nixpkgs.hello --arg config ...
<tilpner> (For my setup, which might be slightly different than what electroc1t has)
<electroc1t> well on my gentoo system, nixpkgs points to .nix-defexpr/channels/nixpkgs
<electroc1t> which is what i want
<electroc1t> but on my nixos machine it points to nixos/nixpkgs
<tilpner> Try NIX_PATH=.../.nix-defexpr/channels
<clever> tilpner: when you use nix-env --arg config '{allowUnfree = true;}' it will pass it to the function it loaded
<clever> tilpner: but your calling it with {} already, so it cant
<clever> electroc1t: thats the nixos channel on root, which has a nixpkgs symlink to .
<clever> electroc1t: <nixos> and <nixpkgs> map to the same path by default
<electroc1t> clever: yes i've noticed
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<electroc1t> so i have to put NIX_PATH in my .bashrc if i don't want this behaviour?
<clever> you can also set it in configuration.nix
<tilpner> clever - I have never wanted to pass an argument via nix-env, so I never noticed
<electroc1t> ah
<clever> nix.nixPath i think it was
<electroc1t> that would be better
<infinisil> clever: .nix-defexpr/foo/default.nix works too btw
<electroc1t> clever: thanks
<clever> infinisil: yep
<tilpner> infinisil - .nix-defexpr/foo.nix should work too
newhoggy has quit [Ping timeout: 240 seconds]
<infinisil> tilpner: but then it won't be the foo prefix, right?
<clever> depends on if you want to store a collection of channel-like things or not, and if they have any files they also need
<tilpner> I'm not sure
<clever> it accepts both <name>.nix and <name>/default.nix
mkoenig has quit [Ping timeout: 265 seconds]
<clever> in both cases, the <name> becomes what you refer to it as in nix-env
<clever> if a directory contains a default.nix, it wont be recursed into
mkoenig has joined #nixos
<clever> and it has no depth limit, so ~/.nix-defexpr/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/default.nix becomes a channel called z!
<infinisil> I think for the first time i get this semantics
<infinisil> s/this/these
<clever> the only purpose for channels vs channels_root, is that only root can write to the channels_root directory, so each user can maintain control over their group of channels, but can also share with others
<clever> but nix-env is the only tool to ever use this layout, so its rather useless the instant you want to just build or shell
<tilpner> Hmm, I just tried how "nix build" behaves, but I can't get it to do anything
<clever> i havent looked into how 2.0 works in depth yet
rauno has joined #nixos
<tilpner> Not without -f, at least
<clever> nix edit has been handy
<clever> try: nix edit -f '<nixpkgs>' hello
<infinisil> Haven't touched nix 2.0 at all tbh
<tilpner> I have alias nied = nix edit -f "<nixpkgs>", it's super useful
<clever> the above opens the default.nix for the hello package in $EDITOR
<infinisil> Oh neat, I put in ~/.nix-defexpr/default.nix just "import <nixpkgs>", now I can install stuff fast like `nix-env -iA hello`
Myrl-saki has quit [Read error: Connection reset by peer]
<gchristensen> how can I get a real `ar`? `ar` says I can get it via nixos.binutils, but binutils doesn't have ar, it produces binutils-wrapper-2.28.1/bin/{as,ld,ld.bfd,ld.gold}
coot has joined #nixos
<infinisil> gchristensen: I think I've seen somebody ask that before
<symphorien> iirc it something along the lines of binutils_unwrapped
<gchristensen> interesting
<symphorien> readelf at least is in there
<gchristensen> is that a bug in the wrapper, not providing all the proper tools?
maximiliantagher has quit [Remote host closed the connection]
maximiliantagher has joined #nixos
rauno has quit [Ping timeout: 240 seconds]
maximiliantagher has quit [Remote host closed the connection]
peterzky has quit [Quit: WeeChat 2.0]
maximiliantagher has joined #nixos
anderslu1dstedt has quit [Quit: leaving]
peterzky has joined #nixos
<etu[m]> disasm: Are you the person who's marked as maintainer for gitea?
<disasm> etu[m]: that's me
anderslundstedt has joined #nixos
<etu[m]> disasm: How do you feel about my PR regarding autosetup of Postgres for the gitea service? :)
maximiliantagher has quit [Remote host closed the connection]
peterzky has quit [Client Quit]
maximiliantagher has joined #nixos
<disasm> ooh :) Hadn't looked at it yet
<disasm> etu[m]: can you squash those into one commit and I'll cherry pick to my custom nixpkgs and test?
<etu[m]> Sure, I'll do that
<etu[m]> Otherwise you could apply this diff: https://github.com/NixOS/nixpkgs/pull/36924.diff probably less work :p
endformationage has quit [Read error: Connection reset by peer]
<etu[m]> But I can squash it if you want :)
<disasm> it'll need squashed anyways at merge time
endformationage has joined #nixos
nyberg has joined #nixos
<etu[m]> @dis
<etu[m]> disasm: Squashed and pushed now :)
rauno has joined #nixos
boomshroom has joined #nixos
<boomshroom> Hello!
<infinisil> boomshroom: hi!
<boomshroom> Is NixOS (the distro) x86_64 only, or can it be cross compiled?
<clever> boomshroom: it also runs on 32bit x86, 32bit arm, and 64bit arm
<clever> native compiling is simpler, but it can also be cross-compiled with some effort
<tilpner> Binary caches may have less coverage on other platforms though
<clever> and tools like nix-env dont play nicely with cross-compiling currently
kejace has joined #nixos
<clever> they insist on natively built things
<boomshroom> clever: That's good to here. Is there an option to build it for foregn targets, or is it just the the modules themselves are portable but custom scripts are still nessisary in order to cross-compile?
<boomshroom> *hear
jsoo has joined #nixos
jsoo has quit [Client Quit]
<clever> boomshroom: the nixos side of things works on pretty much any arch linux supports, natively and cross, the issue is more about building the nixpkgs side of things
<tokudan[m]> could someone merge the pull requests for firefox-bin #36921, #36922 and #36923, please?
leotaku has quit [Ping timeout: 248 seconds]
<boomshroom> I'm just asking how to set the architecture, since it doesn't seem like it's an option to nixos-rebuild.
<clever> boomshroom: for native or cross compiling?
<boomshroom> clever: for cross compiling. I'd assume nixos-rebuild would always do the native architecture by default.
fendor has joined #nixos
<clever> boomshroom: i'm not sure how to set the arch for nixos cross, but for nixos native, you can just do nixpkgs.system = "i686-linux"; for example
<clever> and it will farm it out to a machine that can run the right toolchain
<clever> which gives me an idea...
<boomshroom> clever: Thank you. That should help.
Fare has joined #nixos
<boomshroom> It looks like the system parameter is just the double rather than the full structure. There is the config option so I'm curious if I would be able to build nixos with crossSystem set.
tfc[m] has joined #nixos
<clever> nixpkgs.config sets the config arg, but crossSystem is a sibling of config, not a child
<boomshroom> clever: dang it.
<tfc[m]> hi there. i tried to use `nix-copy --to ssh://user@host ...` but it does not work because it thinks that the host is user@host, and not host with user "user". what am i doing wrong?
<boomshroom> I liked how I was able to make my phone claim that its repository was actually x86_64 cross compiling for arm.
<clever> boomshroom: this is where nix imports nixpkgs: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/nixpkgs.nix#L64
<clever> tfc[m]: you can specify a default username in ~/.ssh/config
<boomshroom> clever: I can specify an overlay. >:D
<clever> tfc[m]: https://gist.github.com/cleverca22/07dc4f902b5f6d998965887ff861f406 for example, line 1 is what it matches on from the cli (ssh example.com), then line 2 overwrites the host it actually connects to (optional, but handy for aliases), and line 3 changes the default username
Fare has quit [Ping timeout: 260 seconds]
<clever> tfc[m]: and yeah, id also consider that a bug in nix, an issue should be filed
<tfc[m]> clever: that's what i did. i also defined a hostname "bla" there. but ssh://bla will not work as it claims it does not know the hostname.
<disasm> etu[m]: bear with me one second. Blowing away my state, db and role :)
<clever> tfc[m]: and it works when you just `ssh bla` ?
<tfc[m]> clever: _that_ works.
<srhb> Any Haskell infra peoples around? I'm wondering whether this is a sensible way to wrap haddock https://github.com/srhb/nixpkgs/commit/ddfe28de224ea279ac4c5117bbe3b459fc742f90
<etu[m]> disasm: Just be careful so you don't loose any data! :)
<boomshroom> Can I access the current nixpkgs channel from a list of packages, or do I just (import <nixpkgs> args)?
<clever> tfc[m]: `strace -ff -o logfiles -e execve nix copy --to ...` can you gist the logfiles this generates?
<clever> boomshroom: pkgs.path is the path the pkgs set came from
<foldingcookie> electroc1t: yeah, it's really frustrating
<clever> boomshroom: so you could import (pkgs.path) { new config };
<boomshroom> clever: That's handy.
<clever> boomshroom: ive also used it to refer to files within nixpkgs in a pure manner, tarball = pkgs.callPackage (pkgs.path + "/nixos/lib/make-system-tarball.nix") {
<tfc[m]> clever: one moment. i can do that, but i found out something different. if i put "hostname 1.2.3.4 \n user bla" (instead of giving it a hostname alias) into my ssh config, then it seems to fail differently. now it says it can't find nix-store
<clever> tfc[m]: what OS is the remote machine?
davidlt_ is now known as davidlt
<tfc[m]> clever: that looks like it can get through to the host but on the host it did not source the nix sourcefiles yet. when i do "ssh 1.2.3.4 nix-store" then it cannot find it.
<tfc[m]> clever: that machine is an ancient centos without access to the internet but intranet. i am trying to get modern tools on it with the help of nix... :D
<disasm> etu[m]: had none to begin with other than a test repo :) I originally created this for my old job but never could convince them to switch to nixos
<disasm> etu[m]: merged! thanks for that improvement!
sigmundv has quit [Ping timeout: 248 seconds]
<disasm> etu[m]: I'm also going to cherry-pick to 18.03 because I see that one as worthwhile.
<tfc[m]> clever: so it currently looks like that i need the ssh login to source the nix paths. but it seems to not access the normal .profile file. what to do?
obadz- has joined #nixos
<clever> tfc[m]: i think you need to add the nix logic to .bashrc
<clever> tfc[m]: interactive and non-interactive shells source different files
<etu[m]> @disasm: nice, thanks!
<nyberg> It is possible to inspect the functions in scope of a closure?
<tfc[m]> clever: wow that works!!!
John882 has quit [Quit: John882]
obadz has quit [Ping timeout: 256 seconds]
obadz- is now known as obadz
John882 has joined #nixos
thblt has joined #nixos
detran` has quit [Ping timeout: 245 seconds]
<boomshroom> I am currently attempting to build a riscv cross-compiled nixos. This might take a while.
<clever> boomshroom: i aimed nixops at this file, https://gist.github.com/98f4e81bfc9750b3484d5b477c1e2d11 and am now running `nixops deploy --build-only`
<clever> boomshroom: it is currently downloading armv7l builds of everything from the binary cache, and sources for some
paraseba has quit [Remote host closed the connection]
<boomshroom> Do the binary caches have riscv64 packages?
<clever> not that i'm aware of
<clever> but if you configure a build slave in /etc/nix/machines, it can just build them
<clever> error: a 'armv7l-linux' is required to build '/nix/store/vpl6gfsq8q6rvb5c1983vi65b67bs51q-bootstrap-tools.drv', but I am a 'x86_64-linux'
<clever> if you dont, it fails like this
<clever> i should finish my qemu module
<boomshroom> clever: In that case, I made the right choice to make the system x86_64, but with an overlay that specifies crossPackages = riscv64
<clever> qemu-user can trick the native toolchain
<boomshroom> clever: That's nice.
<clever> lets see, boot.binfmtMiscRegistrations
rardiol1 has left #nixos [#nixos]
John882 has quit [Quit: John882]
John882 has joined #nixos
vieira has joined #nixos
vieira has left #nixos [#nixos]
vieira has joined #nixos
vieira has left #nixos [#nixos]
<srhb> gchristensen: If you have time, I'd like to know what happened here before I merge: https://logs.nix.ci/?key=nixos/nixpkgs.36739&attempt_id=b98617b1-b1dd-4015-add7-7ac75b2c83c6
<ottidmes> I worked around the issue, but I would love to know what I might have done wrong. Earlier today I tried copying a custom samba built from one machine to another via `nix copy --to ssh://othermachine`, and it did sucessfully copy over the paths in the other's nix store, but when I tried to rebuild the config on othermachine, it tried to build from source anyway. The .drv matched that of the copied one, so I am
<gchristensen> :eyes:
<ottidmes> at a loss as to why it would do so
<gchristensen> that is so weird srhb
<srhb> gchristensen: Glad you think so. :D
leotaku has joined #nixos
<clever> boomshroom: i just set qemu-user.arm = true; on my laptop, its doing a nixos-rebuild switch
tilpner_ has joined #nixos
tilpner has quit [Ping timeout: 248 seconds]
tilpner_ is now known as tilpner
<srhb> gchristensen: I'm not sure what to read from that.
<gchristensen> srhb: just thought you might be interested in knowing such a URL exists
<srhb> ah, thank you :)
<srhb> (I am!)
newhoggy has joined #nixos
magnetophon` has quit [Ping timeout: 240 seconds]
rauno has quit [Ping timeout: 240 seconds]
<srhb> OK, I think something went wrong with the proposed changes to release.nix in that PR.
<srhb> They just exit instantly succesfully.
<srhb> Or wait, do they...
paraseba has joined #nixos
<Lisanna> "gcc" points to gcc 6 in nixpkgs. I'm assuming that's what gccStdenv uses. what if I want to use gcc7 in stdenv?
<srhb> Yeah, okay, something's wrong there..
<gchristensen> yeah looking in to it
magnetophon` has joined #nixos
<Lisanna> "overrideCC gccStdenv gcc7"
<Lisanna> is it literally that easy
<clever> boomshroom: all i did was set qemu-user.arm = true; https://gist.github.com/cleverca22/ac838bd5c8781cb01768e5f55a3c5496
<srhb> gchristensen: Sorry I didn't check for this. I just assumed it was okay. I don't think it's related to ofborg after all :)
<boomshroom> "cannot execute binary file" Probably because it's a riscv64 executable.
<clever> boomshroom: and now i can run arm binaries!
<gchristensen> ok srhb
<gchristensen> heres the problem ... cat /dev/grahamc/messages/future > the-issue
newhoggy has quit [Ping timeout: 246 seconds]
fendor has quit [Ping timeout: 264 seconds]
<boomshroom> clever: I'm assuming qemu-user is a NixOS configuration option (that may or may not be upstreamed)?
<clever> boomshroom: i'm in the middle of writing that module right now
<boomshroom> clever: The idea of running foregn binaries as though they're local is very apealing. Would it also mean devices like my phone would be able to have my desktop build packages without spoofing the localSystem?
<gchristensen> srhb: commented, thank you for the IRC ping :)
<clever> boomshroom: yeah, but performance will be worse for the build
<clever> boomshroom: ive even used it to run a closed-source x86 program on a raspberry pi once
<srhb> I can work around it by doing `tests.kubernetes.dns.singlenode = (callSubTestsOn...).singlenode` instead of `tests.kubernetes.dns = callSubTestsOn ...` -- that should be fine
<srhb> Oh, yours is better. Thanks!
Izorkin_ has joined #nixos
<gchristensen> mine doesn't work :P
<gchristensen> but should work..?
<boomshroom> clever: It would slow down individual packages, but it would also grant more access to the binary cache and would allow my phone to build packages itself once gcc was installed
<srhb> gchristensen: I think so, yes. Errr. :-)
<srhb> I'll figure it out, don't worry about it. Sorry for the noise :-)
roberth has quit [Ping timeout: 264 seconds]
<boomshroom> Is it possible to use builtins.toFile to create a derivation?
<gchristensen> srhb: not noise!
tmaekawa has joined #nixos
Izorkin has quit [Ping timeout: 246 seconds]
tmaekawa has quit [Client Quit]
<gchristensen> srhb: also can you open an issue on the ofborg tracker about the weird "No log available" but also "(full log)" thing?
ryanartecona has quit [Quit: ryanartecona]
kejace has quit [Ping timeout: 260 seconds]
magnetop` has joined #nixos
<boomshroom> Asside from installing qemu-user, how does it tell the kernel to run it when a foregn binary is encountered?
<clever> boomshroom: the qemu-user expressions i wrote include a register script written in bash
<srhb> gchristensen: I can do the first, not sure I understand the second. :P
magnetophon` has quit [Ping timeout: 240 seconds]
<gchristensen> srhb: https://github.com/NixOS/nixpkgs/pull/36739#issuecomment-373476081 it claims there is no log, but there is a link to the full log
<boomshroom> I'm just curious how you get the kernel to run a particular binary when faced with that kind of file.
<srhb> Ah!
<srhb> OK
<symphorien> binfmt_misc ?
<clever> symphorien: yep
orivej has quit [Ping timeout: 240 seconds]
<clever> boomshroom: i'm writing a nixos module to fully automate it
<boomshroom> clever: I look forward to seeing said module.
Fare has joined #nixos
<boomshroom> "Since QEMU is also a linux process, you can launch QEMU with QEMU" XD
leotaku has quit [Quit: ZNC 1.6.5 - http://znc.in]
<boomshroom> What I was looking for seems to be binfmt_misc.
hakujin has quit [Ping timeout: 264 seconds]
<clever> boomshroom: you also need to know what bits to match against
<clever> boomshroom: this is the old code for handling it: https://github.com/cleverca22/nix-misc/blob/master/qemu-user.nix#L8
<clever> boomshroom: line 31-40 generates a bash script to configure it
<clever> but nixos now has a boot.binfmtMiscRegistrations to handle things for you
logzet has quit [Remote host closed the connection]
<boomshroom> Sweet.
Lisanna has quit [Quit: Lisanna]
<boomshroom> I'm geussing shebangs are implemented with a similar mechanism
<clever> src/libstore/derivations.cc:59:62: error: 'class nix::Settings' has no member named 'get'; did you mean 'set'?
<clever> hmmm
<clever> boomshroom: nope, thats built into the kernel
<boomshroom> clever: It shouldn't be hard to write a shebang parser in userspace, disable the kernel one, and use binfmt to call the userspace parser.
<gchristensen> clever: my problems with that store path were because of a problem with my ethernet-to-thunderbolt adapter.3
magnetop` has quit [Ping timeout: 260 seconds]
<clever> it looks like the Settings class has been entirely rewritten since i made this patch
<tilpner> clever - Why do you echo into /proc/sys/fs/binfmt_misc/register over using boot.binfmtMiscRegistrations?
<tilpner> Oh
<clever> tilpner: boot.binfmtMiscRegistrations didnt exist when i wrote that
<tilpner> But your module will use boot.binfmt*?
<clever> yeah
leotaku has joined #nixos
hakujin has joined #nixos
<boomshroom> How long until a wine module gets added that registers with boot.binfmtMiscRegistrations?
<clever> src/libstore/derivations.cc:59:36: error: conversion from 'nix::Setting<std::__cxx11::list<std::__cxx11::basic_string<char> > >' to non-scalar type 'nix::StringSet {aka std::set<std::__cxx11::basic_string<char> >}' requested
<clever> hmmm, now to wrangle some c++ types!
<tilpner> boomshroom - Debian has it already
<tilpner> And wikipedia gives us :DOSWin:M::MZ::/usr/bin/wine:, which should be easy to adapt to boot.binfmt*
<boomshroom> tilpner: The wikipedia article specifically mentions Java and Wine being common uses for binfmt
<boomshroom> With the configuration option, it should be trivial for a use to add them.
hakujin has quit [Ping timeout: 276 seconds]
<{^_^}> Channel nixos-18.03-small advanced to https://github.com/NixOS/nixpkgs/commit/812b2196fc1 (from 56 minutes ago, history: https://channels.nix.gsc.io/nixos-18.03-small)
ma27 has quit [Ping timeout: 245 seconds]
srk has quit [Ping timeout: 252 seconds]
<boomshroom> Interesting, binfmt supports matching on file extensions as well.
Adluc has quit [Ping timeout: 256 seconds]
<boomshroom> Which makes sense, since jars are just zip folders.
<tilpner> Extension matching doesn't work for me yet, I must've made a mistake
Adluc has joined #nixos
aborsu has joined #nixos
<boomshroom> It doesn't look like there's any way to pass addition flags to the interpretor, but that could probably be remedied by a small wrapper.
<tilpner> boomshroom - I tried with tx0.co/7
palo_ has quit [Ping timeout: 240 seconds]
palo has joined #nixos
palo has quit [Changing host]
palo has joined #nixos
<clever> tilpner: you must also avoid dynamically linked binaries if your emulating another platform, due to how ldd works
Adluc has quit [Ping timeout: 246 seconds]
<clever> tilpner: ldd just sets some magic variables, and runs the local ld.so against the file in question
<clever> binfmt-misc then runs qemu against that ld.so
<dtz> grahamc: I am now, what's up? :)
<clever> then the x86 ld.so parses those magic vars, and dumps qemu's deps!!
<clever> and suddenlllllllly, you have x86 libraries in your arm initrd!
<tilpner> clever - Huh, what are you replying to? :o
<clever> tilpner: the writeShellScriptBin in your paste
Adluc has joined #nixos
<clever> thats using a dynamic bash, so ldd returns bash's deps, not the foreign binary deps, but in java's case, ldd doesnt make sense
<tilpner> You're saying I shouldn't use writeShellScriptBin for qemu-user?
<tilpner> (But it's fine with java?)
<clever> tilpner: you just need to be carefull when the foreign binary is something ldd can be ran on
leotaku has quit [Ping timeout: 240 seconds]
<tilpner> clever - Have you encountered ln: failed to create symbolic link '/run/binfmt/jar/4c609qh1skw9vaw0xwzmi1x0az8v26p7-binfmt-jar': Read-only file system while developing your module?
<clever> nope
nyberg has quit [Quit: WeeChat 2.0]
leotaku has joined #nixos
newhoggy has joined #nixos
srk has joined #nixos
<boomshroom> Can I use something like makeWrapper to wrap a binary as a derivation?
<clever> boomshroom: there is both makeWrapper and wrapProgram, i can never remember which is which, but one takes a pair of source and destination, so destination becomes a bash script that runs source
<clever> boomshroom: the other just renames the program to .foo-wrapped, and then calls the 1st
<boomshroom> The thing is I don't want to build a derivation and wrap its output, I want to wrap an existing derivation's output as a derivation itself.
<clever> for example?
<boomshroom> wrap "${pkgs.java}/bin/java" { flags = ["-jar"]; };
newhoggy has quit [Ping timeout: 264 seconds]
Synthetica has quit [Quit: Connection closed for inactivity]
zzamboni has joined #nixos
<mpickering> can someone close this pls? https://github.com/NixOS/nixpkgs/issues/36374
<Baughn> boomshroom: You can make a trivial derivation that does that, yeah.
<boomshroom> Baughn: I'm about to do so.
<{^_^}> Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/ba816ee0872 (from 2 days ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
orivej has joined #nixos
<clever> boomshroom: runCommand "java-wrapped" { buildInputs = [ makeWrapper ]; } "makeWrapper ${java}/bin/java $out --add-flags -jar"
* srhb accidentally mistyped it git refog. As in re-fog. This is fitting.
<clever> nix-repl> :b runCommand "java-wrapped" { buildInputs = [ makeWrapper ]; } "makeWrapper ${jre}/bin/java $out --add-flags -jar"
<boomshroom> clever: Thanks, I was about to write a raw derivation from scratch
<clever> this derivation produced the following outputs: out -> /nix/store/d45qjlxala1yrisjj1wn70q9wificfgf-java-wrapped
<clever> -r-xr-xr-x 1 root root 188 Dec 31 1969 /nix/store/d45qjlxala1yrisjj1wn70q9wificfgf-java-wrapped
<foldingcookie> why does sshing to a nixos box give a different password prompt than I'm used to ("Password:" instead of "user@host's password:")?
<clever> exec "/nix/store/qgrslxc2flrc5yr47fdv0w5mk7sfx5ql-openjdk-8u172b02-jre/bin/java" -jar "${extraFlagsArray[@]}" "$@"
<tilpner> The activation script doesn't seem to handle changes and renames to binfmt registrations
<tilpner> Which I guess would be annoying for little benefit
hakujin has joined #nixos
* foldingcookie looks
<clever> ive found that if you get the password wrong a few times, ssh will start showing the user@host
<clever> to remind you which password you should be inputing
<foldingcookie> clever: apparently that's just falling back to the next auth method
<srhb> From above, that appears to be a fallback
<srhb> Yeah...
<foldingcookie> srhb: guess I need "something.sshd.passwordAuthentication = true;" someplace
<clever> ah, it might be a side-effect of how the interactive auth works
* foldingcookie is still very much learning how nixOS works
<clever> i prefer disabling password auth entirely
<clever> ssh keypair or go home
<srhb> foldingcookie: Looks like services.openssh.passwordAuthentication
<foldingcookie> cool, thanks
<srhb> But that defaults to true
<srhb> So I'm guessing it's ordering
<foldingcookie> oh
<srhb> Can you try changing it on your client?
<foldingcookie> ugh
<boomshroom> I don't trust my passwords enough to keep out snoopers. I even changed the port to make it a little more anoying.
<foldingcookie> that'd be a workaround since the client hasn't changed
<foldingcookie> I can see what happens though
<srhb> Yeah
<srhb> I'm not sure if the server can ever send a preferred order or anything
<foldingcookie> "ssh -o PreferredAuthentications=password server2" does show "user@host's password:"
<srhb> So maybe the other servers you're used to has keyboard-interactive off?
hakujin has quit [Ping timeout: 276 seconds]
<foldingcookie> they seem to leave PreferredAuthentications default
<{^_^}> Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/fabbf35d8dc (from 31 hours ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
<srhb> Oh, the sshd daemons has that? Then it's probably just the order
<srhb> Hmm, no.. Confusing
<foldingcookie> oh, I may have misunderstood
zzamboni has quit [Quit: Leaving.]
<foldingcookie> but my sshd_config basically leaves auth stuff as default on my non-nix machines
<foldingcookie> except "UsePAM yes" and "ChallengeResponseAuthentication no"
<foldingcookie> where's nixOS keep its sshd_config?
<srhb> foldingcookie: It's in the store. You can find it with systemctl cat sshd
<srhb> On the ExecStart line, as the -f parameter
<foldingcookie> hm, it has "ChallengeResponseAuthentication yes"
<foldingcookie> wonder if that's relevant
<srhb> Could be!
maximiliantagher has quit [Remote host closed the connection]
<clever> boomshroom: simply add qemu.nix to the imports of your configuration.nix, and set qemu-user.arm = true; and it configures everything!
zzamboni has joined #nixos
<srhb> foldingcookie: KbdInteractiveAuthentication: Specified whether keyboard-interactive authentication is allowed. By default, the value of ChallengeResponseAuthenticationis used.
<foldingcookie> ah, nice!
<foldingcookie> thank you
<foldingcookie> can unprivileged users do "nixos-rebuild switch"?
<srhb> man 5 sshd_config, by the way :)
<srhb> foldingcookie: Nope.
<srhb> They can nixos-rebuild build though
<foldingcookie> it got pretty far before it got upset about permissions while symlinking
<foldingcookie> is there a reason not to forbid it outright?
<srhb> Yes, most of it's just the building after all :)
<srhb> Aside from it running the steps it can do without permissions (and thus relying more on the actual privileges rather than internal extra handling) -- I don't think so.
<srhb> It's a really simple script
<srhb> 387 lines of bash :)
<foldingcookie> mm
<clever> foldingcookie: there is also the fun `nixos-rebuild build-vm`
<clever> foldingcookie: it generates a bash script, that runs the finished nixos build under qemu
<foldingcookie> srhb: prompt issue fixed :)
<srhb> foldingcookie: Neato.
<foldingcookie> now if I can just figure out how to get X11 working ;_;
<clever> foldingcookie: services.xserver.enable = true;
<foldingcookie> that seems system-wide, but I'd rather run X as my user with no display manager
lassulus_ is now known as lassulus
lassulus has quit [Changing host]
lassulus has joined #nixos
dejanr_ has quit [Ping timeout: 240 seconds]
<srhb> I think the deprecated wiki article is pretty close. It probably needs updating for security.wrappers though...
<clever> foldingcookie: systemd doesnt really like that
<srhb> Oh..
<srhb> Meh.
<foldingcookie> srhb: do you know what xlaunch is or where I can read about it?
<srhb> I don't, sorry.
dejanr has joined #nixos
<foldingcookie> the only references I see on the web are about a GUI thing for Cygwin...
<srhb> That certainly sounds wrong :)
hakujin has joined #nixos
<srhb> It's probably more wrong than I thought then.
<foldingcookie> I also don't know why xlaunch would need to be suid
<clever> foldingcookie: Xorg needs root to access most gpu's
<srhb> Can anyone take over the console like that?
<clever> srhb: and yeah, you could just run a fake terminal, and fake the login prompt
<srhb> Ah
<clever> srhb: but thats where the sak comes in, its a lot like ctrl+alt+del on windows
<foldingcookie> clever: aiui there's some logind stuff that obviates suid
<clever> with the right key sequence, you can kill every process on the current tty
<foldingcookie> for the purpose of starting a display server when you've logged in on a TTY
<clever> systemd will then re-spawn the login prompt
<clever> and you can be sure the prompt is coming from the system
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos
hakujin has quit [Ping timeout: 276 seconds]
<aborsu> Hello, sorry to disturb, I was wondering if any one is using steam successfully?
hakujin has joined #nixos
<clever> aborsu: i have it working on my system
<clever> foldingcookie: yep, systemd doesnt allow that
<foldingcookie> clever: what is 'that'?
<boomshroom> Anyone have a spare sha256 I can borrow?
<clever> foldingcookie: launching X manually
<clever> !tofu
<{^_^}> To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected.
<foldingcookie> clever: systemd and manual startx get along fine on my non-nixOS systems
<boomshroom> That works.
<clever> foldingcookie: things may have changed since that commit
<foldingcookie> possible, but I'm still not sure what specifically is reputedly forbidden
<foldingcookie> there definitely shouldn't be any need for an extra suid helper in the modern era... I guess I'll figure this out eventually
<{^_^}> Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/d4be6b330e0 (from 16 hours ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
<foldingcookie> going about things the way I'd expect to work, I run into the problem of Xorg needing to find the modules from xf86-video-intel and xf86-input-evdev
slyfox_ is now known as slyfox
hakujin has quit [Ping timeout: 256 seconds]
ma27 has joined #nixos
<boomshroom> clever: It looks like enabling qemu user implicitly adds arm to the supported platforms.
<clever> boomshroom: yep
<clever> boomshroom: it also patches nix to even support that option
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nixos
vidbina has quit [Ping timeout: 260 seconds]
<jtojnar> neat, I just accidentally ctrl-c'd the build of webkitgtk
<jtojnar> 73 % done
<boomshroom> Wait one moment, I giving my system the ability to run cygwin packages.
<clever> jtojnar: i just started a nix build that appears to involve 546 derivations...
<boomshroom> If I write to nix.supportedPlatforms manually, will that overwrite the targets that you set automatically?
<clever> boomshroom: the type is listOf str, so nix will automatically append each value together
<clever> boomshroom: but you can use mkForce to wipe out the values ive set
<boomshroom> nix.supportedPlatforms = ["i686-cygwin" "x86_64-cygwin"]; # This should be fine right? :P
<clever> yep
<clever> you could also fork my repo, and file a PR to add the qemu-user's
<srhb> jtojnar: :'|
maximiliantagher has joined #nixos
<boomshroom> clever: Actually, I just have it run fetchFromGitHub
<foldingcookie> does anyone know where /etc/systemd/system/display-manager.service comes from?
<clever> boomshroom: https://github.com/riscv/riscv-qemu is also of interest
<boomshroom> Do you know if it supports userspace emulation?
<foldingcookie> clever: thanks <3
<clever> boomshroom: unknown
<clever> boomshroom: oh, look at the most recent commit in this dir: https://github.com/riscv/riscv-qemu/tree/riscv-all/linux-user
<clever> `RISC-V Linux User Emulation`
<boomshroom> >:D I'm going to run all the things.
<clever> i see tests for TARGET_RISCV64 but nothing that sets it
<clever> lets see what happens if i just throw nix at it
<boomshroom> Does wine on NixOS support x86_64 applications by default?
maximiliantagher has quit [Ping timeout: 264 seconds]
<clever> boomshroom: it needs a special flag
<clever> [clever@system76:~/iohk/nix-hs-hello-windows]$ nix-env -i -E '{ ... }: with import <nixpkgs> {}; wine.override { wineBuild = "wineWow"; }'
<clever> [clever@system76:~/iohk/nix-hs-hello-windows]$ WINEARCH=win64 WINEPREFIX=/home/clever/prefix-2018-03-05 wine result/bin/hs-hello.exe
newhoggy has joined #nixos
<clever> [clever@system76:~/nixos-configs]$ nix-build '<nixpkgs>' -A qemu-user-riscv --arg overlays '[ (import ./overlays/qemu-user.nix) ]'
leotaku has quit [Ping timeout: 240 seconds]
<clever> boomshroom: and with this, i can apply an overlay just for a single build
vidbina has joined #nixos
<clever> ERROR: Unknown target name 'riscv-linux-user'
<clever> now i just need to figure out what qemu calls it
<boomshroom> error: infinite recursion encountered
<disasm> anyone else run into issues with trackpad not emulating middle click gesture since 18.03? (currently using synaptics but mtrack has same problem. https://github.com/disassembler/nixos-configurations/blob/master/machines/sarov.nix#L211-L229
<clever> boomshroom: i got that when i didnt use ()
<boomshroom> clever: around...?
<clever> the import
<clever> mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak"
<boomshroom> I parenthesised the import.
<clever> riscv32-linux-user.mak
<clever> does --show-trace help?
<boomshroom> while evaluating the module argument `pkgs' in "/etc/nixos/configuration.nix":
newhoggy has quit [Ping timeout: 248 seconds]
<clever> boomshroom: can you gist your configuration.nix file?
leotaku has joined #nixos
maximiliantagher has joined #nixos
<paraseba> is the nix build --builders option supposed to work? It keeps building locally. Does this look OK? --builders 'ssh://hostname x86_64-linux'
<clever> paraseba: i think you need to be a trusted user or root to use that kind of option
<clever> boomshroom: ahh yeah, that problem, nixos has to fully parse all imports, before it can do anything with pkgs
<clever> boomshroom: you need to use (import <nixpkgs>{}).fetchFromGitHub or builtins.fetchTarball (which supports a sha256 in nix2)
<paraseba> ohhh thanks clever. Any idea how can I achieve some form of own binary cache? nix-serve stopped working with a key parsing error
<boomshroom> clever: thanks.
<clever> boomshroom: also, what is wrong with me, i typed that whole thing by memory! :P
<boomshroom> YOU MEMORISED AN ARCHIVE HASH!
<boomshroom> ?!
<clever> paraseba: was the key generated by nix-store?
<clever> boomshroom: that part was a paste, but the rest of the url was by hand :P
<clever> the github url's are burned into my brain
<foldingcookie> ok, looks like the only real work needed is writing an Xorg.conf with Section "Files" and ModulePath declarations
<foldingcookie> should be easy enough to try when I'm next at the console :)
<paraseba> clever: yes, using this command a long time ago: nix-store --generate-binary-cache-key host-name-no-port nix-serve.sec nix-serve.pub
<paraseba> it worked for months...
<clever> paraseba: if you generate a new set, and compare the keys visualy, do they appear to be similar in format?
<clever> ive had no issues with nix-serve on this end
<paraseba> yes, they look similar. It's weird that the error logged seems to be trying to sign
maximiliantagher has quit [Ping timeout: 260 seconds]
<paraseba> i even changed the keys, same error
<clever> paraseba: can the nix-serve user read the private?
<paraseba> it can, this is the error: invalid character in Base64 string at /nix/store/0hy0zmlzwdhm52lcm0r14wrdl6ca8n1v-nix-serve-0.2-7e09caa/libexec/nix-serve/nix-serve.psgi line 42
<paraseba> reading some of the perl documentation, it seems the encode function that code is calling is not "safe" for arbitrary bytes, only for not-wide string characters
<paraseba> but it never failed before the last upgrade ...
<clever> paraseba: nix-serve is due for a rewrite, it doesnt use the new signature stuff in nix 2.0
<boomshroom> I'll be logging off soon (to restart after this rebuild), so see you later today!
boomshroom has quit [Quit: WeeChat 2.0]
<clever> boomshroom: ok, i now have riscv qemu-user's, now i need a riscv binary
<paraseba> clever: do you know of any other way to achieve a similar result, I was hopping 'nix copy' over ssh could help, but it complains about signatures. I guess I need to sign all my store before being able to copy stuff?
mduggie has quit [Ping timeout: 246 seconds]
zzamboni has quit [Quit: Leaving.]
<clever> paraseba: `nix copy --no-check-sigs` and the receiving user being trusted (root is trusted) lets you bypass
<paraseba> ahh nice one, I missed that option, will give it a try. Thanks clever
hakujin has joined #nixos
<edef> jtojnar: mind giving https://github.com/NixOS/nixpkgs/pull/28206 a second round of review?
<tilpner> clever - You want to merge this upstream, right? (Including the extra platforms patch to Nix?)
<clever> tilpner: i think sphalerite was working on getting that nix patch upstreamed
mduggie has joined #nixos
<sphalerit> Oh yeah I forgot about that
<sphalerit> I still need to add docs
<clever> sphalerit: ive taken it to new extremes
<jtojnar> edef: sorry too tired today, and you should probably get review from someone familiar with the code, I was just passing by
<clever> sphalerit: this configures everything
<clever> sphalerit: its now just a qemu-user.arm = true; and it works, even in nix
<tilpner> clever - Maybe expose the magic strings from qemu (via the attrset or passthru), so that you don't have duplicate them in your module
<tilpner> *have to
<clever> tilpner: i deleted them from the main qemu-user package, the register script is no more
<clever> sphalerit: do you happen to have some staticly linked riscv binaries?
<sphalerit> No, I've never touched riscv
<clever> tilpner: ive already deleted that 2nd section, not yet pushed
<tilpner> Ah, okay :)
<sphalerit> shlevy might
zzamboni has joined #nixos
<sphalerit> Or busybox
<clever> sphalerit: i already checked the bootstrap busybox's in nixpkgs
newhoggy has joined #nixos
<sphalerit> clever: I mean the binaries on busy box's eebsitr
<sphalerit> -typos
<sphalerit> Was just a guess. Idk
newhoggy has quit [Ping timeout: 263 seconds]
qknight has joined #nixos
<coconnor> I'm having issues with nix copy over ssh and signatures as well.
<coconnor> though, I thought the server was set up to sign builds
<qknight> hey. in the buildPhase of emscripten i'd like to run: https://github.com/kripken/emscripten/blob/incoming/tests/runner.py but it has python dependencies and i don't yet see how to package this on the fly
<coconnor> does anyone have a successful config for signed builds?
<qknight> can i run 'nix-shell' inside a mkDerivation's buildPhase?
<qknight> that'd be awesome
<clever> qknight: why would you want to?
<coconnor> what should the permissions be for the path provided to secret-key-files ?
<clever> coconnor: i think root-only
<clever> coconnor: and it only applies to things built after the setting it added
<clever> coconnor: you need to use `nix sign-paths` to sign things that came from before then
<qknight> clever: as i said, i need to run a python script coming with emscripten which needs some libraries
<clever> qknight: pythonWithPackages
<qknight> clever: git grep pythonWithPackages in nixpkgs has 0 results
<qknight> sure this is correct?
<clever> nix-repl> python3.withPackages (ps: with ps; [ websockets ])
<coconnor> clever: ah ha! That was it: An old path. The recent (post config change) paths copied.
<clever> qknight: its named a little differently then the haskell variant
<clever> qknight: also, `nix copy-sigs` can download signatures from cache.nixos.org, so you can copy things you didnt make, without having special trust setup
<coconnor> clever: as for permissions, the signature file I'm using is also root only. Makes sense, but no explicit mention in docs.
ryanartecona has joined #nixos
ron_ has joined #nixos
maximiliantagher has joined #nixos
Slabity has quit [Remote host closed the connection]
robstr has quit [Remote host closed the connection]
chisui has quit [Ping timeout: 260 seconds]
robstr has joined #nixos
robstr_ has quit [Quit: WeeChat 1.9.1]
civodul has joined #nixos
Fare has quit [Ping timeout: 240 seconds]
knupfer has quit [Ping timeout: 240 seconds]
mmk- has joined #nixos
MP2E has joined #nixos
robstr has quit [Ping timeout: 264 seconds]
<qknight> clever: that python.withPackages was actually a very nice idea
newhoggy has joined #nixos
dan_b has joined #nixos
<rawtaz> qknight: got an url to it?
<leotaku> a application I would like to package with nix requires a full path to another applications binary, how do I provide that?
<clever> leotaku: one option, is to put that 2nd program into the buildInputs,and then do $(which foo) in the build scripts/hooks, and embed that path
<symphorien> ${lib}/lib/blah.so
<clever> thats the 2nd option
newhoggy_ has joined #nixos
newhoggy has quit [Ping timeout: 264 seconds]
<Yaniel> or just add it to buildInputs and then point the application to ${blah}/bin/blah
ryanartecona has quit [Quit: ryanartecona]
zzamboni has quit [Quit: Leaving.]
boomshroom has joined #nixos
<boomshroom> I'm back from my laptop.
<boomshroom> Let's see if the binfmt_misc stuff works after a reboot.
<disasm> is there an easy way to query hydra for what jobs are failing because of a failing build? Kinda the reverse of dependencies?
zzamboni has joined #nixos
<clever> disasm: i dont think there is an easy way to do that
<tilpner> boomshroom - Perhaps restarting systemd-binfmt would be enough
prismate has joined #nixos
<boomshroom> tilpner *would have been* enough, it's a little late now. ;)
prismate has left #nixos ["WeeChat 0.3.8"]
<tilpner> Yeah, I restarted a few times too
<clever> i havent restarted once
<tilpner> But you restarted systemd-binfmt, right?
szicari has quit [Quit: szicari]
<clever> nixos-rebuild did that automatically
<tilpner> Huh
coot has quit [Ping timeout: 252 seconds]
jensens has joined #nixos
<clever> it can detect when services are changed and restart them for you
alhariel has quit [Ping timeout: 248 seconds]
<tilpner> That didn't work out-of-the-box for me
<{^_^}> Channel nixpkgs-18.03-darwin advanced to https://github.com/NixOS/nixpkgs/commit/812b2196fc1 (from 4 hours ago, history: https://channels.nix.gsc.io/nixpkgs-18.03-darwin)
<foldingcookie> ok cool, got display-manager-less X11 working
<foldingcookie> ugh now I have to make a wiki account
<symphorien> foldingcookie: a github account is enough
<foldingcookie> ok, now I have to make one of those
<boomshroom> It seems as though I can't spoof my local system to mingw because it wan't a native stdenv.
<boomshroom> "Library libssp-0.dll (...) not found" :(
vidbina has quit [Ping timeout: 264 seconds]
newhoggy_ has quit [Remote host closed the connection]
<ottidmes> Is there an easy way in Linux to create the dirs in a path with a certain mode/user/group? I tried with `install -D --owner=user --group=group`, but it will create the missing directories as the user calling install, in my case root
<clever> ottidmes: i would just do mkdir -pv and then chown -R
vidbina has joined #nixos
<ottidmes> clever: Yeah, but if the paths already exist, I might change the ownership of sibling files and directories which I do not want
le0taku has joined #nixos
<ottidmes> clever: I could of course create a little script that does what I want, but I expected this to be a pretty normal use case
lord| has joined #nixos
alhariel has joined #nixos
<le0taku> How can I add the output of $(command) to buildFlags?
leotaku has quit [Ping timeout: 264 seconds]
<symphorien> you cannot do it within nix
<symphorien> it must be done in shell:
<symphorien> buildPhase = '' make CFLAGS=$(command) '';
<le0taku> ok
mmk- has quit [Remote host closed the connection]
<boomshroom> I'm going to see if I can run an ARM build of Nix on my x86_64 machine.
vidbina has quit [Ping timeout: 240 seconds]
<ottidmes> le0taku: I would recommend doing: preBuild = ''export buildFlags="... your stuff ... $buildFlags"'';
hiratara has quit [Ping timeout: 276 seconds]
<le0taku> ottidmes: oh, d
<le0taku> that sounds nice
toppler has quit [Ping timeout: 260 seconds]
hiratara has joined #nixos
<shlevy> clever: I can get you some, why?
<clever> shlevy: i want to test qemu-user for riscv32 and riscv64
<shlevy> clever: OK. Definitely works for riscv64 :)
<shlevy> Why do you need static binaries by the way?
<shlevy> You can just cross-compile whatever
<shlevy> clever: Lemme share my setup
<shlevy> One sec
<boomshroom> shlevy: I too am interested.
<shlevy> I use a wrapper so we can respect setuid and caps and such
<clever> shlevy: did you make boot.binfmtMiscRegistrations ?, it has an option for that
<shlevy> I did make it
rardiol1 has joined #nixos
<clever> the module i linked uses that to configure everything
<clever> including nix
jtojnar has quit [Read error: Connection reset by peer]
<boomshroom> nix-repl> builtins.currentSystem
<boomshroom> "arm-linux"
<shlevy> Yeah, then you can just cross-build Nix or whatever on staging and see themagic
alex`` has quit [Quit: WeeChat 2.0.1]
fouric1 has quit [Quit: WeeChat 1.9.1]
fouric has joined #nixos
<clever> shlevy: what does the wrapper do that matchCredentials doesnt?
<{^_^}> Channel nixpkgs-18.03-darwin advanced to https://github.com/NixOS/nixpkgs/commit/6dc10f3d047 (from 2 hours ago, history: https://channels.nix.gsc.io/nixpkgs-18.03-darwin)
<dtz> ^_^
<shlevy> clever: I think matchCredentials requires you to take in the binary as an fd
<shlevy> At least according to the kernel docs it does
<clever> ah
<clever> and the nixos module for binfmtMiscRegistrations doesnt support that?
<shlevy> So this just tells qemu to open /proc/self/fd/whatever
<shlevy> It does, but qemu doesn't
<clever> ah, and the nixos module doesnt have that wrapper built into it
<shlevy> Right, maybe that should be commonly available but not every program is going to want that
<shlevy> Note that I pass -0 as well to get argv[0] support
<shlevy> that's qemu specific
<shlevy> Not a big deal, but is nice :)
newhoggy has joined #nixos
<clever> shlevy: ive also found riscv64.busyboxMinimal in the stdenv area, but now i'm out of disk space
zzamboni has quit [Quit: Leaving.]
oida has quit [Ping timeout: 268 seconds]
newhoggy has quit [Ping timeout: 252 seconds]
Ariakenom has quit [Quit: Leaving]
newhoggy has joined #nixos
joelpet has quit [Remote host closed the connection]
<foldingcookie> what determines which symlinks exist in /run/current-system/sw/lib?
<boomshroom> nix-shell -p qemu-riscv --run "qemu-riscv64 result/bin/hello" > "FATAL: kernel too old" Hmm...
<clever> foldingcookie: the packages put in systemPackages
joelpet has joined #nixos
<tobiasBora> Hello,
<tobiasBora> I'd like to know, I'm trying to follow this: https://github.com/NixOS/nixpkgs/issues/29778
<tobiasBora> so I created the good .config/nixpkgs/config.nix file
<tobiasBora> but I'm not sure to know what command I need to run to apply it
<tobiasBora> is it nix-env -i nix?
<foldingcookie> clever: ohhhh
<foldingcookie> ty
<boomshroom> tobiadBora: You shouldn't need to apply it, it will be used from now on when using nix commands.
<boomshroom> assuming you're not running as root.
<boomshroom> tobiasBora: Sorry, typoed your name.
oida has joined #nixos
<clever> tobiasBora: the override in the 2nd last comment effects nix, so you would need to nix-env -iA nixpkgs.nix to install it with those changes
dan_b has quit [Ping timeout: 246 seconds]
<tobiasBora> thank you!
Havvy has quit [Read error: Connection reset by peer]
<boomshroom> `nix-store --optimise` -> `error: cannot open connection to remote store 'daemon': could not set permissions on '/nix/var/nix/profiles/per-user' to 1777: Read-only file system`
<boomshroom> It's already 1777!
<clever> boomshroom: you can use the x86 nix to build arm packages
<boomshroom> clever: That's just from running my default x86 nix.
dan_b has joined #nixos
<boomshroom> Though it may be from the patched nix.
Myrl-saki has joined #nixos
<Myrl-saki> clever: You mentioned about `runghc Setup.hs`, got any idea on how to do that?
<clever> Myrl-saki: runhaskell Setup.hs
<boomshroom> It seems like I'm locked out of nix entirely; trying to re-run a previous command that worked a few minutes ago now gives the same persmission error.
<clever> boomshroom: you may need to dig into /nix/var/nix/profiles/system, find the previous generation, and run its bin/switch-to-configuration switch
<clever> /nix/var/nix/profiles/system-359-link/bin/switch-to-configuration switch
<clever> for example
<clever> that would perform a rollback to version 359
<boomshroom> clever: error: opening lock file '/nix/var/nix/profiles/system.lock': Read-only file system
pie_ has quit [Remote host closed the connection]
<clever> boomshroom: as root
<boomshroom> nvm, should have been root.
aarvar has joined #nixos
<boomshroom> nope, that didn't fix it.
pie_ has joined #nixos
<clever> boomshroom: did you go back to an old enough generation?
knupfer has joined #nixos
ma27 has quit [Ping timeout: 256 seconds]
<boomshroom> clever: I tried the oldest generation I still have. The only difference is now it's trying to open db/big-lock instead of profiles/system.lock.
<clever> boomshroom: try test instead of switch
hiratara has quit [Quit: ZNC - http://znc.in]
<foldingcookie> clever: systemPackages appears to work for libX11 but not imlib2 (silently doesn't add any symlinks when I do `nix-rebuild switch`); any pointers?
<boomshroom> rite_file '/run/systemd/start-list' - sysopen: Permission denied at /nix/var/nix/profiles/system-64-link/bin/switch-to-configuration line 126.
<clever> foldingcookie: why do you want libraries in that directory?
<boomshroom> *write_file, the copy cut off the first character.
<foldingcookie> for legacy binaries I have sitting around
<clever> foldingcookie: they need to be patchelf'd
<clever> foldingcookie: /run/current-system/sw/lib isnt in the default search path
<clever> ld.so isnt even at the normal path
<foldingcookie> yes, I've been LD_LIBRARY_PATHing
<foldingcookie> is there a tool to run patchelf appropriately?
hiratara has joined #nixos
<foldingcookie> also, I'm not sure I understand what /run/current-system/sw/lib *is* for
<clever> you need to know what packages it depends on, so its simpler to just write the nix expressions
<clever> i dont think /run/current-system/sw/lib should even exist
<boomshroom> Could it have something to do with trying to run nix repl as arm?
<foldingcookie> what is it... ostensibly for?
<clever> foldingcookie: i'm not sure, id consider its existance a bug
<Myrl-saki> clever: Sorry, was AFK. I mean w.r.t. haskell.mkDerivation
<foldingcookie> haha, ok
<clever> Myrl-saki: haskell.mkDerivation runs Setup.hs automatically
<foldingcookie> what about the bin sibling?
<clever> foldingcookie: thats what $PATH points to
<Myrl-saki> clever: Right. I mean, using `runhaskell Setup.hs` instead of compiling and linking and running.
coot has joined #nixos
<clever> Myrl-saki: ahh right
<Myrl-saki> clever: Thanks.
zzamboni has joined #nixos
<boomshroom> rebooting my desktop
<tobiasBora> I'm having some trouble to write a basic nix formula...
<tobiasBora> I would like to merge two ideas into one formula: http://paste.debian.net/1015008
knupfer has quit [Ping timeout: 265 seconds]
<Myrl-saki> clever: Also, shouldn't that be `-o ${setupCommand}`?
<tobiasBora> I tried several things, but it does not compile, either because it does not know pkgs, or because the LET is unexpected
MichaelRaskin has joined #nixos
<clever> Myrl-saki: line 179, its hard-coded to ./Setup
<clever> Myrl-saki: so the variable doesnt really have a purpose
blankhart has quit [Ping timeout: 263 seconds]
knupfer has joined #nixos
<alhariel> so ive specified time.timeZone = "America.Sao_Paulo" in configuration.nix, but when i run timedatectl it says "time zone: n/a"
<alhariel> also do you guys use services.localtime or some ntp variant
jensens has quit [Ping timeout: 246 seconds]
<clever> alhariel: try a / instead of a .
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<alhariel> oh..
fiddlerwoaroof_ is now known as fiddlerwoaroof
<alhariel> thanks
<alhariel> :)
<boomshroom> Looks like a reboot fixed the issue.
<ron_> How do you nixops from head? I sync to the nixos-unstable channel, but it seems the nixops there lacks some features I would like to try.
<clever> shlevy: dang!, a rebuild-switch temporarily disables binfmt-misc, causing builds to break
<boomshroom> Except that running nix-store --optimise caused it to break again.
coot has quit [Quit: coot]
knupfer has quit [Ping timeout: 260 seconds]
simukis has quit [Ping timeout: 264 seconds]
John882 has quit [Quit: John882]
<tobiasBora> Yeees I got it :D
<tobiasBora> http://paste.debian.net/1015009 (if someone thinks that it's a quite dirty way to proceed, don't hesitate to tell me)
dan_b has quit [Ping timeout: 264 seconds]
<tobiasBora> In the package nixpkgs/nixos/lib/make-system-tarball.nix, I'm not sure to understand the use of symlink
<tobiasBora> where `object' if a
<tobiasBora> # store path whose closure will be copied, and `symlink' is a
<tobiasBora> # symlink to `object' that will be added to the tarball
<tobiasBora> I guess that there is a small typo, it's "object is a...3
hakujin1 has joined #nixos
<clever> tobiasBora: it creates a symlink at the root of the tar, pointing to the storepath you configured
<clever> so scripts that consume the tar know what the storepath is
<tobiasBora> clever: hum... First I thought that nix was not supposed to work with symlink no?
<{^_^}> Channel nixos-18.03-small advanced to https://github.com/NixOS/nixpkgs/commit/6dc10f3d047 (from 3 hours ago, history: https://channels.nix.gsc.io/nixos-18.03-small)
<clever> tobiasBora: it still has a normal /nix/store directory
<clever> tobiasBora: but it also has a symlink (/kexec_nixos in the above example), that points into the store
<clever> so you dont have to stare into a pile of 200 storepaths, and guess which one you want
peterzky has joined #nixos
<tobiasBora> clever: in this example, /kexec_nixos points to the unreadable url with the hash, for the package kexec_script?
<clever> yeah
hakujin has quit [Ping timeout: 246 seconds]
thblt has quit [Ping timeout: 248 seconds]
<tobiasBora> then I understand this example, but I don't understand the one that someone gave me yesterday here:
<tobiasBora> storeContents = [ { object = nix; symlink = "/nix"; }];
<clever> that will probably break hard
<tobiasBora> so it's wrong?
<clever> the intention was to have a /nix symlink to tell you what path nix is at, but it conflicts with the /nix/store directory
<clever> so you need to name it something else
<boomshroom> Hmm. After a reboot, I was able to to do a switch-to-configuration test, but I can't do anything else and it gives a bunch of "Read-only file system" errors spanning /var, /bin, /nix, and /usr.
<clever> storeContents = [ { object = nix; symlink = "/nix_link"; }];
<clever> boomshroom: what does dmesg say?
<tobiasBora> clever: ok so now it's clearer now. But why do I really need to setup a symlink? I may not be allowed to write in /nix_linke
<clever> tobiasBora: you can tell tar to skip writing that, or just unpack it to a tempdir and move what you wanted
<boomshroom> Odd, tmux new is also failing with "lost server"
<tobiasBora> clever: ok. But do you know where the output file is supposed to be ? ^^'
erasmas has quit [Quit: leaving]
ryanartecona has joined #nixos
<clever> tobiasBora: which output file?
<tobiasBora> ok I found it
<tobiasBora> the one that nixpkgs/nixos/lib/make-system-tarball.nix created
<clever> nix-build always makes a result symlink pointing to the result
<boomshroom> dmesg spams "systemd-journald[663]: Failed to write entry (20 items, 18905 bytes), ignoring: Read-only file system" with the byte count alternating between 18905 and 810 and occationally 1226. The 1226 byte entries also have 32 items instead of 20.
<tobiasBora> clever: good point.
<boomshroom> Something seems VERY wrong.
Myrl-saki has quit [Ping timeout: 263 seconds]
<clever> boomshroom: check near the top of dmesg, if its not lost already
<boomshroom> That seems like systemd itself is failing.
<clever> boomshroom: it sounds like your hdd is failing, and linux switched to read-only to prevent corruption
<Dezgeg> /var mounted read-only for some reason?
<clever> boomshroom: it could also be your ram
<boomshroom> clever: That doesn't sound good.
davidlt_ has joined #nixos
freeman42x]NixOS has quit [Ping timeout: 256 seconds]
* clever heads off to bed
<boomshroom> I don't see anything anomolous near the top.
<boomshroom> File /var/log/journal/486b4fd0709844fa981b7aab87d8a39d/system.journal corrupted or uncleanly shut down, renaming and replacing.
maximiliantagher has quit [Remote host closed the connection]
davidlt has quit [Ping timeout: 240 seconds]
maximiliantagher has joined #nixos
<boomshroom> BTRFS error (device sda3): eb 168802598912 invalid extent inline ref type 0
hakujin1 has quit [Ping timeout: 276 seconds]
gerschtli has joined #nixos
hakujin1 has joined #nixos
<boomshroom> I'm trying a btrfs scrub, but I can't monitor the progress because "read-only filesystem"
dylex has joined #nixos
zzamboni has quit [Quit: Leaving.]
hakujin1 has quit [Ping timeout: 245 seconds]
gerschtli has quit [Ping timeout: 264 seconds]
<coconnor> usually dmesg will indicate why the file system was remounted read-write
<coconnor> errr remounted read-only
<boomshroom> coconnor: BTRFS found an error. That said, that very error is preventing me from doing btrfs scrub. I'm not doing btrfs check --force.
<tobiasBora> Ok so I moved the file, extracted the tar. Now, I have the nix store inside, but someone told me that it was not enough to copy it to /nix, and that I should run a script for that
<boomshroom> So far, 2 corrupt extent records
<tobiasBora> I have some files like nix-path-registration, pathlist, and closure-*-nix-*, maybe it's linked somehow?
blankhart has joined #nixos
<boomshroom> It seems like btrfs check won't repair unless it's unmounted regardless of force.
<tobiasBora> boomshroom: yesterday you told me to notify you once I would have copy the tar content into /nix, so that you can tell me the next step, so here I am ;)
<boomshroom> tobiasBora: You used nixos generate tarball with a nix installation?
<tobiasBora> boomshroom: yes
<tobiasBora> boomshroom: proot drives me crazy with some strange segfault (not sure if it's because of proot or nix), so I decided to first try the manual version
<boomshroom> if you list the files in the tarball, does it give the full store path you specified when building nix?
le0taku has quit [Ping timeout: 246 seconds]
maximiliantagher has quit [Remote host closed the connection]
maximiliantagher has joined #nixos
maximiliantagher has quit [Remote host closed the connection]
Sonarpulse has quit [Ping timeout: 240 seconds]
<tobiasBora> boomshroom: well for now on the computer that I'm deploying there is usernamespace enabled, so I did not changed the store path (next step for later)
maximiliantagher has joined #nixos
<tobiasBora> boomshroom: and here are the files that I get: closure-ndw8ppsxxf6914z5d2j93w7i133gvnfd-nix-1.11.16 nix nixos-system-x86_64-linux.tar.xz nix-path-registration pathlist
<tobiasBora> and nix contains a store folder
aborsu has quit [Quit: aborsu]
Profpats1 is now known as Profpatsch
<boomshroom> tobiasBora: Those get extracted to the "root" and if I remember correctly, nix-path-registration is what initialises the database.
<boomshroom> I don't think the closure file, pathlist, or the inner tarball are important, but keep them somewhere in case they are.
davidlt_ has quit [Ping timeout: 240 seconds]
maximiliantagher has quit [Remote host closed the connection]
<tobiasBora> boomshroom: the thing is that this is not a script, it's a simple /nix/store/2gxzfkyl05040p97f7lzilv7yx3jj3v7-libseccomp-2.3.3
maximiliantagher has joined #nixos
<tobiasBora> 0000000000000000000000000000000000000000000000000000000000000000
<tobiasBora> 0
<tobiasBora> with lot's of lines like this
<boomshroom> The path registration? Then the script would be in /nix.
<boomshroom> I don't have access to either machine I used for that. One has a broken filesystem and the other has a dead battery.
<tobiasBora> boomshroom: not sure to find it http://paste.debian.net/1015013
<boomshroom> Hold on, I still have the file that built it and my laptop is still in comision.
<{^_^}> Channel nixos-18.03 advanced to https://github.com/NixOS/nixpkgs/commit/622c5bebbea (from 28 hours ago, history: https://channels.nix.gsc.io/nixos-18.03)
<{^_^}> Channel nixpkgs-18.03-darwin advanced to https://github.com/NixOS/nixpkgs/commit/90d01305fb4 (from 75 minutes ago, history: https://channels.nix.gsc.io/nixpkgs-18.03-darwin)
schoppenhauer has quit [Ping timeout: 248 seconds]
kreisys has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
boomshroomlaptop has joined #nixos
<boomshroomlaptop> Accidently hit the power button
<tobiasBora> ahah ok ^^
kreisys has joined #nixos
digitus has quit [Quit: digitus]
<boomshroomlaptop> I'm having trouble disabling distributed builds
MichaelRaskin has quit [Ping timeout: 264 seconds]
<boomshroomlaptop> Now I just need to wait for it to build.
<foldingcookie> what package provides DRI libs (i965_dri.so and friends)?
boomshroom has quit [Ping timeout: 260 seconds]
boomshroomlaptop is now known as boomshroom