<nh2>
simpson: Yes it had me very stalled. I even dreamt the previous night that it was a trivially fixable problem with some overlay, and I was so disappointed when I went to the computer and the problem I thought was responsible for the issue only existed in the dream.
<jasom>
So, the most full featured driver for my printer was not in nix (the generic escpr driver works, but doesn't support e.g. the rear printer tray). I wrote an overlay that works; should I go through the trouble of writing a PR to get it into nixos?
<clever>
jasom: yeah, then you can save others the trouble
<jasom>
there are two other nearly identical nix expressions, as most of the epson model-specific drivers are delivered the same. A project for later might be to make a function to generate packages for all of the rest of them too.
<jasom>
it was literally find/replace the .rpm file name, change the SHA and everything worked.
<clever>
nice
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
matthuszagh has joined #nixos
<matthuszagh>
hello. is there a way to remove attributes in an overlay?
<matthuszagh>
i see the `removeAttrs' builtin, but i'm not really sure how I'd use it
<matthuszagh>
to be clear, use the overlay to remove an attribute from the original set
<clever>
matthuszagh: cant really remove an attr with an overlay, but you can set it to null
<pie_>
is it possible to use build-vm with virtualbox
<clever>
pie_: i dont think virtualbox supports virtio-fs and 9plan
<clever>
well, they use something entirely different
<pie_>
quemo is sloow
alex`` has quit [Ping timeout: 248 seconds]
<pie_>
*quemu
<pie_>
clever: aha
<clever>
pie_: does /dev/kvm exist?
<matthuszagh>
clever: thanks
<pie_>
clever: on my host system?
<clever>
pie_: yes
<pie_>
yeah
<clever>
pie_: and is the host nixos?
<pie_>
yeah
<clever>
pie_: qemu should be running at full performance then...
<clever>
pie_: but only if virtualbox has no guests open when you boot qemu
<pie_>
hm
<pie_>
well ill try again
<pie_>
it was slow when i tried this two days ago
<tjg1>
how can i add a custom file to initrd?
<pie_>
tjg1: boot.loader.grub.extraInitrd seems to exist but im not sure its what you want
<clever>
tjg1: one min
<pie_>
clever: do i have to run it as root
<clever>
pie_: no, check the permissions on /dev/kvm
<pie_>
seems fine
<pie_>
what im observing is kde takes really long to get past the splash screen
<clever>
pie_: check top on the host, what is using the cpu?
vmandela has joined #nixos
<pie_>
clever: qemu is using 152% but there's room to spare
<pie_>
no cores are maxed out
<clever>
tjg1: boot.initrd.extraUtilsCommands is probably what you want
<clever>
tjg1: yeah, looks like boot.loader.grub.extraInitrd is the best option, generate an initrd that contains the secret key (cpio -H newc) and then give that the path
<pie_>
clever: will changing that qemu setting change the buildvm runtime environment?
<pie_>
or were you just linking it for illustration
<clever>
pie_: runtime env?
<pie_>
the amount of memoery it gets
<clever>
pie_: you set that in your configuration.nix, and it will adjust the shell script used when launching qemu
<tjg1>
thanks, let's try it out
terps has quit [Ping timeout: 250 seconds]
<pie_>
hm ok
<pie_>
clever: i just feel like theres a bit of a spatial disconnect between that and build-vm
<clever>
pie_: build-vm will build a script in qemu-vm.nix
<clever>
and that script obeys the cfg you put in configuration.nix
<pie_>
oh this is a "builder" script, not some system level config?
<pie_>
"virtualisation.memorySize"
<pie_>
* "# This module creates a virtual machine from the NixOS configuration."
<clever>
pie_: build-vm will build the entire nixos, then build a shell script, that runs nixos, in qemu, with the configured amount of ram
terps has joined #nixos
<pie_>
feels a bit weird being directly under virtualisation and not like, virtualisation.build-vm.memory
<pie_>
(or something like that)
terps has quit [Read error: Connection reset by peer]
<tjg1>
clever: pie_: that works great, thank you
<pie_>
clever: uhh "error: The option `virtualisation.memorySize' defined in `/etc/nixos/configuration.nix' does not exist." ok so it would make more sense if im not supposed to set it top level
<pie_>
but then where
<clever>
pie_: ignore that, its why the option doesnt show up in the docs
<clever>
pie_: build-vm will dynamically jam another module into your imports list
<clever>
but nixos-rebuild first uses your config to try to build nix itself (causing that error)
<clever>
then it builds your config again, to make nixos (which wont error)
<pie_>
wow so much obscure stuff
<clever>
and because its an ad-hoc module in imports, it doesnt show up in docs
erasmas has joined #nixos
<pie_>
wait isnt this supposed to be impossible, or does it use sring concatenation on my config? :P<clever> pie_: build-vm will dynamically jam another module into your imports list
<pie_>
i cant believe things like this are still a problem in linux
<clever>
lol
<rsoeldner>
Can someone help out with setting up nixops postgresql deployment. I'm using this configuration https://gist.github.com/rsoeldner/e14294fdca8ddcb900b28b0a3a9d6ed2 and trying to connect over "host='localhost' port=5432 dbname='app'" but receive 'libpq failed (could not connect to server: Connection refused'
<yabobay>
is nix-env _supposed_ not to give any output while installing stuff?
hyper_ch2 has quit [Remote host closed the connection]
<symphorien>
are you on darwin by any chance ? there used to be a bug where software which is only supported on linux would silently fail to install with nix-env
<yabobay>
im on the nixOS live iso
<yabobay>
the only output i got (after a while) is "installing 'emacs-26.1'"
<symphorien>
that's fine
<yabobay>
so its installing properly?
<srhb>
yabobay: can you run emacs? :)
<yabobay>
?
<srhb>
You just installed emacs. Can you run emacs?
<yabobay>
nix-env is still running
<symphorien>
well you have to wait then :)
<yabobay>
does it seriously have no output? is there like a verbose option or something?
<no-n>
how do I get ncurses? I tried environment.systemPackages = [ ..., ncurses, ncurses.dev ]; in my /etc/nixos/configuration.nix, but I get curses.h: No such file or directory.
terps has quit [Ping timeout: 264 seconds]
asymptotically has joined #nixos
ubert has joined #nixos
terps has joined #nixos
o1lo01ol1o has quit [Remote host closed the connection]
<asymptotically>
hi, i created a small shell.nix with gcc in the buildInputs. then after using it, i changed gcc to gcc9, however `nix-shell --run 'gcc --version'` still shows gcc 7. do i need to run some command to refresh everything? thanks :)
cizra has quit [Ping timeout: 250 seconds]
cizra has joined #nixos
<infinisil>
asymptotically: You need to use gcc9Stdenv.mkDerivation
<adisbladis>
asymptotically: I recommend overridinig the stdenv used to create the shell
<adisbladis>
Also what infinisil said :)
<joepie91>
devdocs__
<joepie91>
devdocs++ *
___laika has quit [Ping timeout: 245 seconds]
<tilpner>
asymptotically: If you put it into nativeBuildInputs, it seems to work
<tilpner>
(Please tell if you happen to know why)
___laika has joined #nixos
<asymptotically>
thank you, gcc9Stdenv fixed it :)
tmaekawa has joined #nixos
FRidh has quit [Quit: Konversation terminated!]
nexgen has joined #nixos
iyzsong has joined #nixos
o1lo01ol1o has joined #nixos
tmaekawa has quit [Quit: tmaekawa]
dm9 has quit [Quit: WeeChat 2.5]
___laika has quit [Ping timeout: 248 seconds]
o1lo01ol1o has quit [Ping timeout: 258 seconds]
pie_ has joined #nixos
m0rphism has joined #nixos
erasmas has joined #nixos
<sphalerite>
How does the maintainer information thing on github issues work?
<sphalerite>
specifically: what goes in the affected modules thing?
<makefu>
joepie91: you will be at the CCCAMP in 2 weeks?
<joepie91>
makefu: unfortunately not :( I've decided not to go for medical reasons -- I'll be at congress though!
<pie_>
makefu: isnt it 1 week
<joepie91>
sphalerite: you're not the first to ask, this probably warrants creating an issue to get it clarified
<makefu>
pie_: 1 week already, you are right!
<pie_>
makefu: [panic]
erasmas has quit [Ping timeout: 246 seconds]
sigmundv has quit [Ping timeout: 268 seconds]
logzet has joined #nixos
<adisbladis>
Camp \o/
* adisbladis
<- super excited
Zer0xp has quit [Ping timeout: 258 seconds]
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
rsoeldner has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @teto pushed commit from @link2xt to master « castxml: set correct -DCLANG_RESOURCE_DIR »: https://git.io/fjds1
<tilpner>
Miyu-chan: I've seen spotify do the same thing
fendor__ has quit [Remote host closed the connection]
___laika has joined #nixos
fendor has joined #nixos
alex`` has joined #nixos
<balsoft>
Hey guys, how does `nixos-rebuild -p prof-name boot` work? I'm recreating nixos-rebuild as a custom script, and I would love to have the ability to boot into different git branches of my config. Currently I essentially just `nix build` then `sudo nix-env --profile /nix/var/nix/profiles/system --set /nix/store/94kakr2ishxda5qxms5an5m5crj01ac0-skypeforlinux-8.50.0.38` then `sudo ./result/bin/switch-to-configuration switch`
<balsoft>
whoops
<balsoft>
The skypeforlinux thing is a mistake, it should just read `$(readlink ./result)`
justanotheruser has quit [Ping timeout: 244 seconds]
___laika has quit [Ping timeout: 244 seconds]
rprije has quit [Ping timeout: 272 seconds]
<{^_^}>
[hydra] @edolstra pushed to master « Fix error in GitlabStatus plugin »: https://git.io/fjdGt
inkbottle has quit [Remote host closed the connection]
<asymmetric>
hm, seems to have gone through, at the 3rd or 4th attempt
<__monty__>
Does setting up avahi entail more than just `services = { avahi = { enable = true; nssmdns = true; }; }`?
<mdash>
__monty__: that's all i've got
<mdash>
well also 'ipv6 = true;'
<__monty__>
mdash: And pinging .local hosts works fine for you? This machine can't even ping itself (by avahi name). I get `ping: host.local: System error`.
<exarkun>
avahi does a lot of things, so it might depend on whether you have any more specific requirements
<exarkun>
`hostent get host` or `hostent get host.local`
jabranham has joined #nixos
<mdash>
you can also use `avahi-resolve-address` directly to rule out other layers of the problem
<mdash>
oh, i guess it's `avahi-resolve-host-name` oops.
<{^_^}>
[nixpkgs] @teto merged pull request #66627 → calc: don’t include glibc headers in closure → https://git.io/fj5jn
<{^_^}>
[nixpkgs] @teto pushed commit from @matthewbauer to master « calc: don’t include glibc headers in closure »: https://git.io/fjdCZ
<exarkun>
maybe it's development mode and nix-shell that don't play nicely together?
<exarkun>
eh, though the docs say that works, too
<__monty__>
exarkun: Hmm, that only returns 127.0.1.1 for the machine's hostname, nothing for .local hosts.
asymptotically has quit [Ping timeout: 260 seconds]
<exarkun>
__monty__: Maybe you want to do something with the `publish` option too?
<exarkun>
services.avahi.publish
<__monty__>
Hmm, it sounds like that *might* help with the machine's own .local but it doesn't sound like not having that would prevent the machine from resolving *other* .locals?
<exarkun>
indeed
<exarkun>
from your question it's not really clear what you want to happen :)
<Taneb>
Might you need to open a port?
erasmas has joined #nixos
stites has joined #nixos
MmeQuignon has joined #nixos
stites has quit [Remote host closed the connection]
<__monty__>
Taneb: Sounds possible. Though I'd expect a less cryptic error from ping.
<__monty__>
exarkun: I have services.avahi.enable = true and services.avahi.nssmdns = true but pinging this or other .locals results in "ping: host.local: System error". What I want in the end is convenient access to and from the machine with ssh.
<exarkun>
__monty__: There are a lot of pieces here.
<exarkun>
__monty__: There are your, apparently, two machines
<exarkun>
__monty__: There's whatever network infrastructure connects them together
<exarkun>
__monty__: A _lot_ of different things could be broken to make it not work
<exarkun>
Maybe looking at a network capture would be helpful
<__monty__>
exarkun: Yes, first step was checking whether my nixos config for avahi was correct, hence asking here.
AluisioASG has joined #nixos
<__monty__>
I suspect the problem's before the network. How would I do a network capture? Do you mean wireshark or something?
Ariakenom has quit [Quit: Leaving]
<exarkun>
yes, something like that
<exarkun>
avahi works by everybody shouting mdns at each other
<exarkun>
so you should be able to see that passing between the two hosts in question
<exarkun>
if nobody's shouting, maybe avahi config problem
<exarkun>
if they're shouting and nobody hears, maybe a firewall problem
Blessjah has quit [Remote host closed the connection]
ThatDocsLady has quit [Ping timeout: 252 seconds]
Blessjah has joined #nixos
Blessjah has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @asymmetric opened pull request #66682 → ix: init at 20190815 → https://git.io/fjdWG
fusion809 has joined #nixos
___laika has quit [Ping timeout: 245 seconds]
___laika has joined #nixos
selfsymmetric-mu has quit [Remote host closed the connection]
ddellacosta has joined #nixos
waleee-cl has joined #nixos
Chiliparrot has joined #nixos
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #66683 → qt4: Vendor bitrotted Arch Linux patch → https://git.io/fjdWX
<infinisil>
Hm weird, when I use a minimal ISO to boot, I can get to the tty just fine
<{^_^}>
[nixpkgs] @vbgl opened pull request #66684 → mkvtoolnix: use wrapQtApp → https://git.io/fjdW5
<infinisil>
But when I try it with a minimal config, the screen becomes just black when it's starting up
<__monty__>
infinisil: Sounds like missing kernel modules.
<infinisil>
I already tried enabling all firmware with hardware.enableAllFirmware
<infinisil>
Oh and I actually also imported <nixpkgs/nixos/modules/profiles/all-hardware.nix>
<infinisil>
__monty__: And this adds a whole bunch of kernel modules ^^
<__monty__>
Maybe something isn't getting detected? Or does it just load literally everything?
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #66685 → qt4: Vendor bitrotted Arch Linux patch -- for 19.03 → https://git.io/fjdWA
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fjdWp
<infinisil>
Note that another configuration with xserver and everything enabled works fine
<infinisil>
No idea what the iso image does more for it to work :/
ryantrinkle has joined #nixos
<ryantrinkle>
are nix flakes actually something that can be used / tried out at this point? i'm having trouble finding stuff to use
<gchristensen>
ryantrinkle: a prototype implementation exists in the flakes branch on nixos/nix
<gchristensen>
also available on nixpkgs unstable at nixFlakes iirc
<thoughtpolice>
Yeah you can install the nixFlakes package. Note that the RFC is still undergoing pretty heavy discussion so you should be prepared for everything to stop working at literally any second.
<infinisil>
I guess my activation method is a bit weird: I first build the system, then `nix-store --export` to a memory stick, then `nix-store --import` on the machine I need it, then I call `sudo /nix/store/..-system/bin/switch-to-configuration boot`
<gchristensen>
infinisil: you need to gc root the generation too
<infinisil>
I'm not running any GC's and it's just temporary
shibboleth has quit [Quit: shibboleth]
<infinisil>
then I reboot and select the default boot entry. I don't think there's a problem with this, but maybe worth mentioning
<gchristensen>
(I don't know what your problem is, I haven't read up. pointing it out for future log searchers)
<infinisil>
Well I'm really trying to debug a network problem. I know a minimal_iso build doesn't cause it, and my full NixOS config does cause it
<infinisil>
Now I'm stripping down my config to a minimum to see if this was causing it
<infinisil>
But now I'm running into the issue that I can't actually run this stripped version
<infinisil>
yak-shaving-level++
endformationage has joined #nixos
<{^_^}>
[nixpkgs] @matthewbauer merged pull request #66685 → qt4: Vendor bitrotted Arch Linux patch -- for 19.03 → https://git.io/fjdWA
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to release-19.03: https://git.io/fjdlI
Blessjah has joined #nixos
<infinisil>
I guess my next step could be to boot into the minimal_iso installer, install the system (on a different partition), then boot into the installed system to see if it works
<sphalerite>
infinisil: what sort of network problem?
<gchristensen>
what about editing your own config, deleting all of your custom stuff, seeing how it goes, and bisecting your configuration from there
<sphalerite>
infinisil: maybe we can help you reach insights more rapidly? ;)
<infinisil>
gchristensen: Ah yeah, I could bisect from this minimal one to my original config to see where it stops the screen from working
<infinisil>
sphalerite: Short explanation: My computer brings down any network it's connected to
Neo-- has joined #nixos
<gchristensen>
do you have ipfs enabled?
<infinisil>
Oh I think I might have
<gchristensen>
heh
<gchristensen>
localDiscovery says: Whether to enable local discovery for the ipfs daemon. This will allow ipfs to scan ports on your local network. Some hosting services will ban you if you do this.
<gchristensen>
enable says: Whether to enable Interplanetary File System (WARNING: may cause severe network degredation).
___laika has quit [Ping timeout: 272 seconds]
thc202 has quit [Ping timeout: 250 seconds]
<exarkun>
ipfs implements local discovery by port scanning?
equbit[m] has joined #nixos
logzet has quit [Ping timeout: 264 seconds]
<infinisil>
Hm, while I do have the ipfs service, I turned it off by default, so it's not running
wildtrees has joined #nixos
<sphalerite>
infinisil: you could also try tcpdump'ing to see what it's sending the networks that they get so unhappy about
wildtrees has quit [Max SendQ exceeded]
wildtrees has joined #nixos
<infinisil>
sphalerite: I already tried looking at it with wireshark, and while there was lots of red and bad stuff initially, after a minute it was just "ARP Who has <router ip>? Tell <my ip>"
<infinisil>
Lots of TCP retransmissions before that
<infinisil>
sphalerite: And specifically, I was able to ping any IP just fine, but any TCP connection was impossible (or near impossible)
<infinisil>
UDP as well (meaning DNS is failing too)
___laika has joined #nixos
<exarkun>
Why do you say "brings down any network" instead of "this computer has bad network performance"
<exarkun>
Do other hosts on networks you connect it to also suffer?
<infinisil>
exarkun: Yes!
rsoeldner has quit [Remote host closed the connection]
<infinisil>
All hosts on the network stop working
<infinisil>
It's really weird
<exarkun>
What kind of networks have you attached it to?
rsoeldner has joined #nixos
<infinisil>
(well not stop completely, it occasionally works, but very slowly and sporadically)
<infinisil>
exarkun: I tried two: Our normal one with an LTE modem, going over powerline, via ethernet. And I also tried tethering with my phone
sigmundv has quit [Read error: Connection reset by peer]
sigmundv has joined #nixos
<infinisil>
Even with tethering, it made my iphone's browser work really poorly
<exarkun>
Hm. Proprietary LTE modem and an iPhone... Not great debugging targets
<exarkun>
Find something running OpenWRT and connect it to that
<exarkun>
Then start looking at router logs
<infinisil>
I wish I had that
<exarkun>
:(
<infinisil>
I think for now my best bet is to just bisect the config, it has to be *something*
<exarkun>
yea that doesn't seem like a bad idea
sigmundv_ has joined #nixos
<exarkun>
if you quantified the problem more precisely that might help too but it might be harder than bisecting the config.
<infinisil>
You mean what exactly is failing?
<exarkun>
yes
<infinisil>
I think I'll just go bisecting for now, I'd like to get this working again soon
<exarkun>
Like, "DNS is failing" is a start. But failing how? Do packets fail to leave the host? Do they fail to reach the router? Does the router drop them for some reason? Actively or passively? And you can ask a similar set of specific questions about TCP traffic. etc. But maybe not with an iPhone as your router.
<infinisil>
Yeah and this FritzBox router isn't very good for that either..
sigmundv has quit [Ping timeout: 248 seconds]
<infinisil>
(no I can't put openwrt on it, unfortunately)
<infinisil>
So the only logs I have are from the machine that has the problems :)
<infinisil>
But man, bisecting will be annoying, because this `nix-store --import/--export` dance always takes a while
<gchristensen>
wel'll need to grow our community a bit to get there in a reasonable number of years
<infinisil>
exarkun: Probably yeah, but I'd have to manually fix the fileSystems.* values
<infinisil>
And my config started as a copied config from another machine
<infinisil>
Would be really messy probably
<exarkun>
ah
<infinisil>
I guess I could just try to roll back some generations
<exarkun>
you should use feature branches and have always-working master ;)
<infinisil>
How do you mean?
<infinisil>
Oh like track the filesystem changes in a different branch, and merge master and that branch for building the system?
<infinisil>
s/merge/temporarily merge
<exarkun>
probably didn't actually mean anything serious
<exarkun>
ask me again in ten years for nixos configuration devops best practices
<infinisil>
But that would make sense actually, put everything depending on hardware/system state could be in a separate repository even
<infinisil>
s/could be//
<exarkun>
yea, could be
<gchristensen>
it would be a good step if I ever committed my changes to my config repo
<exarkun>
since presumably a problem with bisecting a config is that you can't bisect hardware changes at the same time
<infinisil>
It's kind of a shame really that changing fileSystems.* options makes like a rollback-barrier
<tilpner>
infinisil: You can try navigating to /support.lua on your fritzbox for a package capture interface
<gchristensen>
changing filesystems.* options doesn't create the rollback barrier, it is just a symptom of the rollback barirer
<infinisil>
tilpner: :o!
<infinisil>
gchristensen: Not sure what you mean by that
<exarkun>
ie, it's a symptom, not a cause
<exarkun>
the rollback barrier is that you swapped a disk or something
<infinisil>
tilpner: Damn that's a nice page, why do they hide the nicest functions like that
<infinisil>
exarkun: Ah right
<infinisil>
got it
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
<{^_^}>
[nixpkgs] @joachifm pushed to master « tor-browser-bundle-bin: additional store capture fixups »: https://git.io/fjdl6
zupo has joined #nixos
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<sphalerite>
gchristensen: omg same
<sphalerite>
(never committing changes to config repo…)
<sphalerite>
infinisil: Do you know when the problem started occurring?
<gchristensen>
:D
<infinisil>
sphalerite: Like 1-2 days ago
<infinisil>
But a bit earlier it seemed to start slowly too
ubert has quit [Quit: Leaving]
<sphalerite>
infinisil: looked at your snapshots for what changed?
<infinisil>
Yeah, I haven't done any relevant changes
<sphalerite>
not even nixpkgs version?
<infinisil>
Nah haven't updated nixpkgs in a while
<sphalerite>
damn
<infinisil>
I've actually had a similar problem for a while now
<infinisil>
For some reason going over a VPN solved that however
<infinisil>
But that workaround doesn't work either now
<infinisil>
I feel like this is probably related
<sphalerite>
maybe you need an exorcism
<infinisil>
Hehe maybe
tmaekawa has joined #nixos
<exarkun>
infinisil: are you wireless to all these networks, or wired?
<infinisil>
Wired
<exarkun>
tried a different wire yet? :)
<infinisil>
Well the thing is, this problem is kind of randomly occuring, it's very unpredictable
<gchristensen>
exarkun++
<{^_^}>
exarkun's karma got increased to 2
<infinisil>
I did try a different wire (didn't help), different OS (windows, did help), minimal NixOS iso (did help)
<exarkun>
that's another benefit of defining the problem more precisely, you may be able to make it predictable (and that helps no matter what you do next)
<exarkun>
ah right you said minimal nixos image behaved well before, forgot about that
<infinisil>
But I can't be 100% sure if my tests are actually conclusive, because it's no unpredictable
<infinisil>
s/no/so
<ashkitten>
can someone explain why IFD is frowned upon, btw?
<infinisil>
exarkun: Right now for example, I can use my laptop's internet just fine, even though the bad desktop is connected to the network
<infinisil>
But no internet on the desktop
<infinisil>
And wireshark still seeems to pick up lots of traffic on it, but nothing gets through (or back)
<tilpner>
ashkitten: Without IFD (which I interpret to also include readFile), you can evaluate any build process (NixOS system, package) quickly and without building anything, and then send these tiny derivations to your beefy build farm
<tilpner>
ashkitten: IFD turns this neat process into one with multiple steps, where you have instantiate, build, instantiate, build (or more)
<infinisil>
Oh, now seeing lots of red in wireshark
<gchristensen>
(readFile is IFD if the file you're reading is built by Nix, but not if its like, builtins.readFile ./whatever.json
<ashkitten>
tilpner: ahh
<ashkitten>
is there any way to mitigate that?
<exarkun>
infinisil: "Red" is mind of vague. Did you dig into why it's red? Is it red because Linux is letting the ethernet card compute the checksums or is it red for some good reason?
<tilpner>
gchristensen: Right. I just meant to point out that it's about control flow, not the "import" syntax
<gchristensen>
another big problem with IFD is the evaluator is single-threaded. so if you have multiple derivations you're importing, you don't build them both at the same time.
<ashkitten>
i know there's an rfc for recursive nix, is that meant to address the issue?
<gchristensen>
recursive nix is an overlapping but different problem/solution
<ashkitten>
ahh
chloekek has joined #nixos
<tilpner>
AFAICT ret-cont Nix would help a little, but not entirely eliminate the slowdown
dsiypl4 has joined #nixos
<infinisil>
exarkun: Hm, there's lots of TCP Retransmissions, and TCP Keep-Alive [ACK] ones that are red, and some TCP RST (reset?) ones, some Destination Unreachable (ICMP), I also see TCP Dup ACKs and
<infinisil>
s/and//
<tilpner>
Mostly because e.g. babel2nix still runs at "evaluation time, but not really"
<infinisil>
Eh whatever, I'll just debug/bisect some more
<infinisil>
If I don't get any further I'll come back
thc202 has joined #nixos
<tilpner>
It would just shorten the first (of hopefully just two) build phases
<sphalerite>
infinisil: aah, there's a way to disble hardware checksumming, maybe try that
<ashkitten>
i suppose another way to mitigate it would be to have "adaptors" which would translate from other formats to nix
<exarkun>
infinisil: good luck
<ashkitten>
so you could use existing lockfiles without generating and building intermediate derivations
<sphalerite>
infinisil: try `ethtool -K enxyz rx off tx off`
<tilpner>
ashkitten: But when and where do those run? Are they integrated into Nix? Are they Nix packages that need to be used in a build?
<tilpner>
(Are they privileged plugins?)
romatthe has joined #nixos
drakonis has joined #nixos
<ashkitten>
i'd imagine they could be plugins, but that introduces the concept of a plugin architecture which has its own problems
<infinisil>
sphalerite: I'll try later, right now the issue isn't even there
<infinisil>
It's hiding, waiting for me to start using the internet, just so it can stop working once I don't expect i
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fjd8t
<{^_^}>
[nixpkgs] @joachifm opened pull request #66687 → Revert "nixos/hardened: use graphene-hardened malloc by default" → https://git.io/fjd8q
<tilpner>
ashkitten: We already have those adaptors, but they're currently run by the maintainer manually, not by Nix
kleisli_ has joined #nixos
jgt has quit [Ping timeout: 264 seconds]
boxscape has quit [Remote host closed the connection]
<ashkitten>
tilpner: yeah, i'm imagining evaluation time adaptors instead
boxscape has joined #nixos
<gchristensen>
that is pretty much what we have now with IFD
<ashkitten>
yeah but it generates intermediate derivations, yes?
<tilpner>
And by using IFD, "evaluation time" turns into "evaluation time, with a build phase or two"
<ashkitten>
hm
ddellacosta has quit [Ping timeout: 272 seconds]
<ashkitten>
so the issue remains, whether it's a derivation or not. give me a moment, i'm tired
<gchristensen>
no worries, it is certainly a complicated problem
stites has joined #nixos
<ashkitten>
okay, so the issue is purely that "we have to do ~something~ before we're able to even evaluate this derivation"
<ashkitten>
that's rough
<gchristensen>
not necessarily
<tilpner>
Doing something might be fine, if that something is quick enough
ng0 has joined #nixos
<gchristensen>
for example, the problem could be "here is a pure derivation which produces some pure nix expressions, which we'd like to then evaluate and build"
<tilpner>
The purist "we need just two phases" can be suppressed, if it doesn't make a difference for any usecase
<gchristensen>
one way this can be solved is by letting nix-build inside a nix-build access the host's nix-daemon socket.
<ashkitten>
is that better than IFD?
<gchristensen>
maybe!
<gchristensen>
it has problems about what happens if some inputs changed? how do you access nixpkgs? is all of nixpkgs an inptu to that build? if so, *every* change of nixpkgs causes it to rebuild
<ashkitten>
it would be extremely nice if we could stop having to put what basically amounts to intermediate build artifacts inside nixpkgs, anyways
dm9 has quit [Quit: WeeChat 2.5]
<petercommand>
is there any way to fetch all sources ahead of time?
<tilpner>
petercommand: All sources of... everything?
<tilpner>
There is a way to at least mirror some parts
<petercommand>
tilpner: of a particular revision of nixpkgs
<infinisil>
Unfortunately there's no easy solution as of now
<tilpner>
petercommand: See maintainers/scripts/*tarballs*
<ashkitten>
also i think i understand now why fixed-output derivations exist... they allow for evaluation without building first, right?
<petercommand>
infinisil: tilpner: thanks
<gchristensen>
ashkitten: they do allow for that, but that is not why they exist
<gchristensen>
ashkitten: they exist because there must be a pure way to interact with the outsid world to fetch sources :)
<ashkitten>
ah, well of course
<infinisil>
"When you can't guarantee the function always returning the same output for the same inputs, just make it always return the exact same thing and guarantee it can never return anything else"
<petercommand>
infinisil: Ahh..doesn't look too good
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<petercommand>
tilpner: how should I use these scripts?
sigmundv_ has quit [Ping timeout: 268 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
<petercommand>
looks like copy-tarballs.pl depends on amazon s3 o.o
<ashkitten>
welp, i gotta go to the doctor in a bit. thanks for the info gchristensen, tilpner
<ashkitten>
gchristensen++
<{^_^}>
gchristensen's karma got increased to 140
<ashkitten>
tilpner++
<{^_^}>
tilpner's karma got increased to 33
<tilpner>
petercommand: This script populates tarballs.nixos.org, which is entered as hashed-mirrors in your nix.conf
<tilpner>
petercommand: If you can't access tarballs.n.o, you could set hashed-mirrors to a different URL
<tilpner>
petercommand: One option would be to setup a Minio host, and use copy-tarballs.pl to provide your own clone of tarballs.n.o
<tilpner>
But you could probably rip out the S3 part entirely if you wanted
<tilpner>
Another option might be to just realise all these sources into a host you register as a substituter
<tilpner>
But then you get to fiddle with rooting all of them
<petercommand>
rooting?..
<tilpner>
Rooting refers to creating/managing garbage collections roots, so that the GC will not eat your sources
<Shyim[m]>
Has someone an idea how to fix "error: creating symlink from '/nix/var/nix/profiles/system-23-link.tmp-9336-1844247411' to '/nix/store/d05ndfgfk60xw9qpib7fc11fhni8qha2-nixos-system-shiina-19.09pre188690.8746c77a383': Permission denied" ?
<Shyim[m]>
forget it i am dumb
jgt has quit [Ping timeout: 250 seconds]
dsiypl4 has quit [Ping timeout: 245 seconds]
o1lo01ol1o has quit [Remote host closed the connection]
dbmikus has joined #nixos
fl0_id is now known as step21
ryantrinkle has quit [Remote host closed the connection]
<__monty__>
Does anyone have a good way to grep through the current nixpkgs checkout of a channel?
freeman42x has quit [Client Quit]
freeman42x has joined #nixos
<__monty__>
Or all channels simultaneously?
whald has joined #nixos
<whald>
hi! i'm currently trying to figure out how to get mkShell and ccache (ccacheWrapper?) play together. but my google-foo is weak, so could anyone please provide some pointers on how to do this?
<tilpner>
__monty__: cd $(nix eval -f channel:nixos-unstable path); rg foo
Shouou has quit [Ping timeout: 252 seconds]
<tilpner>
__monty__: But if you already have a full clone, there are probably better ways
Neo-- has quit [Disconnected by services]
Neo--- has joined #nixos
<__monty__>
tilpner: Why is that nix eval trying to access the network?
<whald>
(what i want is basically a nix-shell where "cc" is some ccache'd gcc)
<tilpner>
__monty__: It fetches that channel for you
<__monty__>
tilpner: I'm only interested in channels that are already in the store though.
<tilpner>
Okay
jgt has joined #nixos
rsoeldner has quit [Remote host closed the connection]
rsoeldner has joined #nixos
jgt has quit [Ping timeout: 264 seconds]
Neo---- has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}>
[nixpkgs] @jwiegley pushed to master « mtr: Only include libcap on Darwin »: https://git.io/fjd4B
<clever>
__monty__: *waves*
woffs has quit [Quit: Gateway shutdown]
woffs has joined #nixos
rsoeldner has quit [Remote host closed the connection]
fendor has quit [Remote host closed the connection]
rsoeldner has joined #nixos
fendor has joined #nixos
fendor has quit [Remote host closed the connection]
<nkaretnikov>
how do i pass { allowUnsupportedSystem = true; } to nix-env without adding it to the config?
<nkaretnikov>
i recall it's possible via a command line option, but i can't figure it out
<gchristensen>
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
<gchristensen>
as an env vanr
<nkaretnikov>
thx!
polman has quit [Ping timeout: 245 seconds]
Izorkin has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<__monty__>
clever: The toxvpn.service always times out for me. I don't see a way to change the timeout using the service. Will I need to manually specify a systemd service? rngd.service always fails too, does toxvpn rely on this?
<__monty__>
Oh, and nscd.service also keeps failing, but I think that's unrelated.
ixxie has joined #nixos
<colemickens>
Is it possible to get gnome and plasma running without enabling it through the xserver nixos options? particularly if I'm using their wayland sessions and don't want to enable a DM?
mexisme has joined #nixos
rsoeldner has quit [Remote host closed the connection]
rsoeldner has joined #nixos
fresheyeball has joined #nixos
<fresheyeball>
anyone out there have experience running gitlab on nixos?
mexisme has quit [Ping timeout: 252 seconds]
___laika has quit [Ping timeout: 246 seconds]
ris has joined #nixos
___laika has joined #nixos
polman has joined #nixos
Neo---- has quit [Read error: Connection reset by peer]
Neo---- has joined #nixos
<{^_^}>
[nixpkgs] @ryantrinkle opened pull request #66689 → wireguard: allow routes to overlap with other routes → https://git.io/fjd4x
<colemickens>
Also, is it possible to get nix-build to output to stdout as it goes, rather than at the end? thinking of partial builds when I'm building my entire system with custom nixpkgs and pushing to cachix, only to find out some package failed partway through, nothing got pushed to cachix and I have to rebuild (since I build on spot instances) ?
boxscape has quit [Remote host closed the connection]
<__monty__>
Is there a 32bit cache? My poor 512MB ram machine is trying to build firefox o.O
erba has joined #nixos
truthadjustr has joined #nixos
truthadjustr has left #nixos [#nixos]
<erba>
Hi, how do people prefer to setup emacs on NixOS? I got all the packages etc declared in emacs.nix but what about config? Just put it like you normally would under emacs.d? Currently I have one big emacs.el together with my emacs.nix that I copy with each rebuild but that doesnt seem like a very good solution..
<erba>
The documentation seem to suggest that you just keep it in emacs.d like normal except let nix handle all the packages.
polman has quit [Ping timeout: 245 seconds]
<drakonis>
check whether your channel is ahead of hydra
<drakonis>
__monty__, rust updated
<symphorien>
__monty__: not for everything. And btw I'm not sure you can compile firefox on 32 bits (the address space is too small)
<samueldr>
__monty__: the channel doesn't wait for a full i686 build to complete before updating
lambda-11235 is now known as XMatrix
XMatrix is now known as lambda-11235
<clever>
__monty__: there is a 32bit cache, but i dont think firefox is configured to build on it
<__monty__>
Hmm, any browser recommendations for old machines? Would lightweight browsers like qutebrowser or midori work?
oida has quit [Remote host closed the connection]
SunWuKung has joined #nixos
greymalkin has joined #nixos
jgt has joined #nixos
logzet has joined #nixos
drewr has quit [Ping timeout: 250 seconds]
jtojnar has quit [Read error: Connection reset by peer]
<trevthedev>
hi! so i come from a NixOS Telegram group with a question, how would I be able to get my package onto the release branch? namely, Dwarf Fortress. I sent a pull request for master a few months back and it was accepted, though idk when or how that'll be put on release ^^
<infinisil>
trevthedev: Fork and clone nixpkgs, check out the release-19.03 branch, make a new branch with a fitting name, cherry pick the commit you want to backport with `git cherry-pick -x`, then push this new branch to your fork
freeman42x has joined #nixos
<infinisil>
So the commands git {clone,checkout,checkout -b,cherry-pick -x,push -u}
cizra has quit [Remote host closed the connection]
Neo---- has joined #nixos
jgt has quit [Ping timeout: 252 seconds]
<gchristensen>
is there a simple program for recording a video?
<trevthedev>
obs, ffmpeg
Neo--- has quit [Ping timeout: 252 seconds]
<trevthedev>
thanks infinisil, will check that out ^^
rsoeldner has quit [Remote host closed the connection]
rsoeldner has joined #nixos
Neo---- has quit [Remote host closed the connection]
Neo---- has joined #nixos
<freeman42x>
I don't understand this lorry (https://github.com/target/lorri) setup instructions: On NixOS, we have a simple service for installing and enabling the needed direnv version at ./direnv/nixos.nix. Download this file and add imports = [ ./direnv.nix ]; to your system's configuration.nix.
<freeman42x>
what should I do with that nix file?
rsoeldner has quit [Remote host closed the connection]
dansvo has joined #nixos
fusion809_ is now known as fusion809
<hexagoxel>
freeman42x: I think you are supposed to save that file named as "direnv.nix", which then is referenced in the next step.
<hexagoxel>
the curl command below does something similar, even though with the important difference of nixos.nix vs nix.nix
cizra has quit [Ping timeout: 252 seconds]
jtojnar has quit [Quit: jtojnar]
sigmundv_ has joined #nixos
cizra has joined #nixos
jtojnar has joined #nixos
jgt has joined #nixos
<freeman42x>
hexagoxel, I see, ty
o1lo01ol1o has quit [Remote host closed the connection]
trevthedev has quit [Remote host closed the connection]
trevthedev has joined #nixos
erasmas has quit [Quit: leaving]
<{^_^}>
[nixpkgs] @Mic92 merged pull request #66651 → erlang: Fix build error on darwin → https://git.io/fjdUH
<{^_^}>
[nixpkgs] @worldofpeace pushed 4 commits to release-19.03: https://git.io/fjdEZ
freeman42x has quit [Quit: Leaving]
freeman42x has joined #nixos
jlv has joined #nixos
<jlv>
Is there a tool to convert an ini file to nix?
<infinisil>
jlv: Probably easier to go through json
<infinisil>
There is builtins.fromJSON and there probably exists an ini -> json converter
page_ has joined #nixos
<jlv>
infinisil: Good idea. Wasn't hard to find a ini to json converter.
page has quit [Ping timeout: 258 seconds]
Neo---- has quit [Read error: Connection reset by peer]
Neo---- has joined #nixos
romatthe has joined #nixos
MmeQuignon has quit [Ping timeout: 252 seconds]
<jlv>
infinisil: can I use builtins.fromJSON to get the nix expression itself, or is that just for importing a json file?
SunWuKung has quit [Quit: Sleeping in 武當山]
jgt has quit [Ping timeout: 264 seconds]
<jlv>
Looking at the manual, looks like its a straightforward String -> String. I just need to figure out how to get a nix repl.
<infinisil>
Like a `nix repl`?
<jlv>
That would do it :D
sebboh has joined #nixos
<sebboh>
Is there something like nix for any of the BSDs?
<jlv>
Hmm, looks like the repl doesn't like multline paste
mihaiii has joined #nixos
<mihaiii>
Hello, how's everyone doing?
<infinisil>
jlv: I think it can handle them if you're careful not to paste too much
<jlv>
infinisil: I think it would be easier to pull the text from a file in this case. Just need to find the function to read a file :)
<infinisil>
import?
<infinisil>
Oh or builtins.readFile
<infinisil>
Ah yeah you can't enter like the '' strings in nix repl
<infinisil>
Wait no you can
<infinisil>
Neat
<jlv>
infinisil: builtins.readFile did it :) But the output is cut down XD So looks like I also need to write out to a file
<infinisil>
Not quite sure what you're doing
<jlv>
Trying to convert a large ini file to nix for use in home-manager
<infinisil>
So you converted it to a json file already with some converter?
wildtrees has quit [Quit: Leaving]
<jlv>
Ya, easy to find online
mihaiii has quit [Quit: leaving]
<infinisil>
Then it should just be `builtins.fromJSON (builtins.readFile ./the/file.json)`
<jlv>
That gives me the string, but the string is too large to display and is displayed with ... so I can't copy it. I think I found the solution though "builtins.toFile"
<infinisil>
Oh, unless you need to, you don't need to get the string of the nix value
<infinisil>
You can do `the.option = builtins.fromJSON ...;` directly in your home.nix
<jlv>
I thought about that, but I expect to edit configuration, and would prefer to do it in nix, so I don't want it hanging around in a .json file.
<infinisil>
I see
nexgen has joined #nixos
<jlv>
Ok, looks like toFile needs a string instead of a set, so if I can convert the set to a string, I should be good. This is starting to get a little silly.
<jlv>
Also, `nix repl` bugs out when a line wraps
<clever>
jlv: what exactly are you trying to do?
<jlv>
Convert an ini file to nix
<clever>
and what is the main reason to do that?
<jlv>
Using the example polybar config as a starting point for using polybar with home-manager
<jlv>
It's pretty big, so I didn't want to manually convert it
<clever>
do you want to actually modify the config from nix? or just use the .ini file as-is?
<infinisil>
jlv: Probably `nix-instantiate --eval --strict -E 'builtins.fromJSON (builtins.readFile file.json)'` should work
<jlv>
Want to modify the config from nix
<clever>
ah
<jlv>
The ini is just the starting point
nexgen has quit [Excess Flood]
nexgen2 has joined #nixos
<clever>
yeah, you probably want to just convert the ini into json (either one-time, or use a derivation and IFD)
<clever>
then fromJSON + readFile it, and use // or recursiveUpdate (or modules and mkMerge) to apply changes
<jlv>
infinisil: That did it!
<infinisil>
:)
<jlv>
It's not formatted, but that should be easily enough to fix with some auto format
<werner291>
Hello! I'm trying to get a shell environment that has Idris with a couple libraries available, but one of the libraries isn't available by default. I got this far: https://pastebin.com/sjJ8nJPp
<werner291>
I'm getting "error: attempt to call something which is not a function but a set". As you can probably tell, I don't really know what I'm doing...