2019-08-18

<clever> currently, the api for asking if a slave has a list of paths, includes a bool allowing it to fetch
<clever> gchristensen: it would also complicate build slaves quering the binary cache for things
<clever> gchristensen: nix-copy-closure can copy just drv files to a remote machine
<clever> and drv files are all named after a hash of their contents
<clever> infinisil: the database mainly just stores the existance, hash, and signature of store paths, but not metadata about them
<clever> infinisil: they arent
<clever> infinisil: ack
<clever> hyperfekt: but you still have the problem of recursively adding it to everything in your closure
<clever> hyperfekt: its ignored
<clever> hyperfekt: meta
<clever> infinisil: it would need to be based on the public key to be secure
<clever> infinisil: and also cache every narinfo in ram, and cache the nar files to disk
<clever> infinisil: basically, it will query multiple upstream binary caches, and then present a single cache interface to downstream clients
<clever> infinisil: yeah
<clever> infinisil: cachecache might help you with the cache performance
<clever> if you GC the cache, things break, badly, for up to a month!
<clever> if something IS found in the cache, it will remember that for 30 days!
<clever> gchristensen: if something isnt found in the cache, nix will remember that for 1h
<clever> [clever@amd-nixos:~]$ nix show-config | grep narinfo-cache
<clever> narinfo-cache-negative-ttl = 3600
<clever> narinfo-cache-positive-ttl = 2592000

2019-08-17

<clever> aveltras: ah yeah, you need a -A to select what you want to build
<clever> ah, that makes it easier
<clever> __monty__: create a patch (diff -u) and then add it to the patches list
<clever> nh2: you need to increase the number the error says to increase
<clever> nh2: the default heap size for the nix evaluator is fairly small
<clever> aveltras: not to me
<clever> nh2: --arg supportedSystems '[ "x86_64-linux" ]'
<clever> aveltras: https://gist.github.com/cleverca22/d386271d1c0e97dada9aab91ca219950 is what i prefer doing, the name on line 16 and 1 will have to match your cabal file
<clever> nh2: note that the eval of the nix expr alone requires several gig of ram, and the resulting jobs need linux, darwin, and aarch64 build slaves, and at least 80gig of disk space
<clever> nh2: that would be release-combined.nix
<clever> aveltras: so the packages can inter-link
<clever> aveltras: oh, right, you need to use the set that this override applies to
<clever> nixos/release.nix is all of the nixos tests
<clever> nh2: pkgs/top-level/release.nix is just the pkgs tree, which is probably what you want
<clever> nh2: just eval it with nix repl, nix-build, or hydra-eval-jobs, or setup a full hydra
<clever> aveltras: try fetchzip in source-overrides then?, i think source-overrides handles the cabal2nix for you
<clever> aveltras: youll need a 2nd callHackageDirect based override to introduce that to your package set
<clever> 185 in self.callCabal2nix pkg (pkgs.fetchzip {
<clever> 183 callHackageDirect = {pkg, ver, sha256}@args:
<clever> 184 let pkgver = "${pkg}-${ver}";
<clever> aveltras: it does callCabal2nix for you
<clever> nh2: everything hydra.nixos.org does goes to cache.nixos.org
<clever> nh2: either that, or have a dedicated jobset made for your branch
<clever> nh2: i'm thinking you can contact gchristensen and see about getting it tested better
<clever> nh2: and i think thats the main purpose of the staging branch, to pre-test such things before master gets broken
<clever> nh2: id let a hydra just build the entire release.nix
<clever> the hash
<clever> ,tofu
<clever> aveltras: you give it the name of a package, the version, and the sha256 of its tarball from hackage, and then it can operate without being present in all-cabal-hashes
<clever> 183 callHackageDirect = {pkg, ver, sha256}@args:
<clever> «lambda @ /nix/store/xcn5jx4di3fbkfgdv3bjmj3ap3p65k9z-nixos-19.09pre179307.bc94dcf5002/nixos/pkgs/development/haskell-modules/make-package-set.nix:183:25»
<clever> nix-repl> haskellPackages.callHackageDirect
<clever> aveltras: you probably just want callHackageDirect
<clever> if the sandbox is enabled, the destination wont exist, and it will fail
<clever> so it will just be a hash of the path its pointing to
<clever> it will eval the symlink itself, not the destination
<clever> yeah
<clever> nkaretnikov: every time you eval the expr, it will hash ./. recursively
<clever> nice
<clever> that would do it
<clever> Thra11: which nixpkgs rev are you using?
<clever> which happens if zfs is enabled
<clever> i suspect zfs is in extraModulePackages
<clever> Thra11: which is being called in this area
<clever> Thra11: and that drv is the result of pkgs.buildEnv, so the pkgs was generated here
<clever> Thra11: it appears to be in the pkgs attribute, line 69
<clever> Thra11: can you pastebin it?
<clever> Thra11: what does `nix show-derivation` say about the linux-modules drv file?
<clever> Thra11: first, you want to see what depends on it, check something like nix-store -q --tree
<clever> Thra11: you can skip it
<clever> __monty__: youll also want a -t for ssh there
<clever> infinisil: ive been wanting to figure out and then "steal" this chunk of code, https://github.com/chessai/nixos-configs/blob/ac508a55caccc4d7e1dc8e6479e343c1b2af740f/pkgs/vim/config.nix#L13-L24
<clever> infinisil: ive found that inserts it at the wrong offset, and lands outside the quotes, its also abnormally slow
<clever> vika_nezrimaya: ah, that will do the == for you, if thats all you need
<clever> vika_nezrimaya: builtins.filter
<clever> or use plain old sha256sum
<clever> dansho: nix-hash is recursive by default, you want to add --flat
<clever> dansho: i think its just the plain sha256 of the file

2019-08-16

<clever> freedan42x: restart wpa_supplicant any time you change the config file
<clever> freedan42x: it should reconnect on its own, check the logs to see why it isnt
<clever> check the logs and status next time, to see why
<clever> if using wpa, run `wpa_passphrase networkname password` to generate a config block for the file
<clever> freedan42x: networking.wireless.enable = true; and manually create a /etc/wpa_supplicant.conf
<clever> freedan42x: yep, its working, so now you just configure wireless as normal
<clever> freedan42x: reboot
<clever> but nixos-generate-config will overwrite hardware-configuration.nix without asking
<clever> also, the files are basically identical, anything that works in one, works in the other
<clever> configuration.nix
<clever> freedan42x: you want hardware.firmeware = [ pkgs.broadcom-bt-firmware ];
<clever> freedan42x: broadcom-bt-firmware has the missing firmware file
<clever> freedan42x: broadcom_sta contains wl.ko, the driver, so that is helping, the problem is that the firmware is missing
<clever> details like that shouldnt be kept secret :P
<clever> source would be better, like an upstream github
<clever> yeah, looks like we need bcmwl-kernel-source packaged first
<clever> i dont see bcmwl in nixpkgs, so we would need the link to its source to even start
<clever> freedan42x: what does `iwconfig` and `ip link` show?
<clever> logs call it bluetooth here
<clever> [ 16.770549] bluetooth hci0: Direct firmware load for brcm/BCM43142A0-04ca-2009.hcd failed with error -2
<clever> the logs say its bluetooth
<clever> is this a wifi or bluetooth adapter?
<clever> it looks like the firmware isnt packaged in nixpkgs
<clever> i can see that
<clever> what says nothing?
<clever> ,locate BCM43142A0-04ca-2009.hcd
<clever> freedan42x: so, its looking for a file with that name
<clever> [ 16.770549] bluetooth hci0: Direct firmware load for brcm/BCM43142A0-04ca-2009.hcd failed with error -2
<clever> [ 2.996342] usb 3-3: Product: BCM43142A0
<clever> [ 2.825289] usb 3-3: new full-speed USB device number 3 using ohci-pci
<clever> freedan42x: i prefer gist.github.com
<clever> yes
<clever> can you pastebin it?
<clever> does dmesg show anything?
<clever> ,locate wl.ko
<clever> freedan42x: a quick google says its `wl`
<clever> freedan42x: do you know what you normally have to load with modprobe to make it work?
<clever> freedan42x: have you tried hardware.enableAllFirmware = true;?
<clever> not easily
<clever> srid: run the same -q --binding on your drv file, then ls the resulting dir, and try to read its README.me
<clever> srid: nix is copying the symlink, but symlinks to ../ fail because nix copied only summoner-cli
<clever> srid: not exactly
<clever> i was half right, but didnt think about symlinks getting broken
<clever> 2019-08-16 18:19:54 < clever> srid: is that listed in the cabal file? does it exist?
<clever> so README.md doesnt exist anymore!
<clever> but summoner-cli was copied without its parent dir
<clever> srid: README.md is a symlink to ../README.md
<clever> srid: aha
<clever> /nix/store/drzs7mzc03cjgs4q95maz0g1wcn8sv2d-summoner-cli
<clever> [clever@system76:~/apps/summoner]$ nix-store -q --binding src /nix/store/nxbvq540470z5b42y6p2y3z0q14s0ql1-summoner-1.3.0.1.drv
<clever> srid: yep, i can reproduce the problem
<clever> mla: nix-locate or the ,locate command on the bot
<clever> yeah, overrides tend to do that
<clever> still building...
<clever> can you add all of the nix files to the github repo and link the branch?
<clever> ah, heh
<clever> i believe shellFor uses that behind the scenes, you could try it also
<clever> something like nix-shell '<nixpkgs>' -A haskellPackages.servant.env
<clever> srid: are you also using .env ?
<clever> probably
<clever> with a relative path
<clever> you must run cabal2nix from the same dir the default.nix will exist in
<clever> srid: is the src= correct?
<clever> srid: is that listed in the cabal file? does it exist?
<clever> srid: i just write a default.nix, that loads each cabal file with callCabal2nix and shoves them all into an overlay
<clever> slabity: if the url hasnt changed, it will take up to 1 hour for it to check for changes
<clever> nix show-config | grep tarball-ttl
<clever> felixfoertsch: its definitely not in kernel space
<clever> contrun[m]: you can add a shell.nix file, and still have it build without nix
<clever> contrun[m]: you probably need to use a shell.nix file, but ive not delt with stack much
<clever> contrun[m]: add more -v's
<clever> werner291: newScope creates a new instance of callPackage
<clever> werner291: everything under idris-modules is likely loaded that way
<clever> thats a list of most things the bot can do
<clever> ,
<clever> ,callPackage werner291
<clever> dansvo: the teamspeak client is an example of how its used
<clever> taktoa nerd-sniped me into fixing that bug, which got me into nixos :P
<clever> yep
<clever> and chrome hangs silently when you try to libredirect it
<clever> in that case, teamspeak is wrapProgram's to libredirect, and chrome was inheriting the redirect preload
<clever> gchristensen: libredirect is the first nix bug i ever delt with, before even intalling nixos, lol
<clever> dansvo: have you looked at libredirect yet?
<clever> no more json middle-man!
<clever> jlv: and hnix will properly deal with escaping all strings as it serializes to nix
<clever> jlv: this will use cabal to parse a .cabal file, then packageToExpr to turn it into a { src = ...; dependencies = ...; } based set, and print it to "output"
<clever> jlv: http://hackage.haskell.org/package/hnix lets you generate a tree of data records, then translate that into a nix expr
<clever> jlv: have you used haskell before?
<clever> werner291: what do you get if you eval `idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])` under `nix repl '<nixpkgs>'` ?

2019-08-15

<clever> werner291: does the error say which line the problem is on?
<clever> werner291: you probably want to use just $src, not ${src}
<clever> werner291: your not using a recursive set, so lines 20 and 24 are referencing this package, not line 14
<clever> > pkgs.src
<clever> then fromJSON + readFile it, and use // or recursiveUpdate (or modules and mkMerge) to apply changes
<clever> yeah, you probably want to just convert the ini into json (either one-time, or use a derivation and IFD)
<clever> ah
<clever> do you want to actually modify the config from nix? or just use the .ini file as-is?
<clever> and what is the main reason to do that?
<clever> jlv: what exactly are you trying to do?
<clever> __monty__: there is a 32bit cache, but i dont think firefox is configured to build on it
<clever> but with zero friends, you have a bootstrap problem
<clever> __monty__: that might be a bug, where it doesnt tell systemd it has "started" until it connects to a friend
<clever> __monty__: do you have a friend added in toxvpn?
<clever> __monty__: *waves*
<clever> lol
<clever> pie_: i use xfce
<clever> pie_: try not-kde?
<clever> virtualbox cant emulate it either
<clever> and qemu cant emulate gpu accel
<clever> pie_: maybe kde has 3d composition enabled by default?
<clever> it is
<clever> pie_: switch to the serial port
<clever> is the qemu menu bar available?
<clever> pie_: what about `top` within the guest?
<clever> pie_: `iostat -x 30`, and look at util%
<clever> pie_: try 2gig?
<clever> configuration is typically just /etc/nixos/configuration.nix
<clever> pie_: line 9 is a normal nixos-rebuild, line 15 is build-vm
<clever> and because its an ad-hoc module in imports, it doesnt show up in docs
<clever> then it builds your config again, to make nixos (which wont error)
<clever> but nixos-rebuild first uses your config to try to build nix itself (causing that error)
<clever> pie_: build-vm will dynamically jam another module into your imports list
<clever> pie_: ignore that, its why the option doesnt show up in the docs
<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
<clever> and that script obeys the cfg you put in configuration.nix
<clever> pie_: build-vm will build a script in qemu-vm.nix
<clever> pie_: you set that in your configuration.nix, and it will adjust the shell script used when launching qemu
<clever> pie_: runtime env?
<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
<clever> that answers the grub vs systemd question, one min
<clever> tjg1: ah, then you dont want extraUtilsCommands
<clever> pie_: MOAR things that dont show up in the docs!, but for a different reason
<clever> pie_: the default build-vm only had ~300mb of ram
<clever> pie_: how much ram did you give the guest?
<clever> pie_: if you hit H in top, it should switch to threads, is it 3 of 50%, or one 100% and a 52% or some other mix?
<clever> good question
<clever> i was pointing to the internal=true; which hides it
<clever> tjg1: what is your end goal?
<clever> tjg1: boot.initrd.extraUtilsCommands is probably what you want
<clever> pie_: check top on the host, what is using the cpu?
<clever> pie_: no, check the permissions on /dev/kvm
<clever> tjg1: one min
<clever> pie_: but only if virtualbox has no guests open when you boot qemu
<clever> pie_: qemu should be running at full performance then...
<clever> pie_: and is the host nixos?
<clever> pie_: yes
<clever> pie_: does /dev/kvm exist?
<clever> well, they use something entirely different
<clever> pie_: i dont think virtualbox supports virtio-fs and 9plan
<clever> matthuszagh: cant really remove an attr with an overlay, but you can set it to null
<clever> nice
<clever> jasom: yeah, then you can save others the trouble
<clever> > { a=1; b=2; } // { b=3; c=4; }
<clever> dansho: //
<clever> dansho: yep, import will just load a nix file, and return that top-level value
<clever> dansho: nix repl expects the file to either be a set, or a function taking a set and returning a set

2019-08-14

<clever> pie_: its containers = { the_node.config = {config, pkgs, ...}: { imports = [ ./file.nix ]; }; }
<clever> pie_: https://nixos.org/nixos/options.html#containers.%3Cname%3E.config
<clever> you want to bisect nixpkgs, with the cache turned off (ow)
<clever> and it will continue to fetch from the cache
<clever> when its fixed-output, hydra(and users) wont notice when the build is broken by changes to deps
<clever> nh2: is that a fixed-output derivation?
<clever> ahh
<clever> you have to insert a call to runHook, at the start/end
<clever> exarkun: if you override installCheck, then the pre/post hooks stop working
<clever> but $out may not exist before the installPhase
<clever> exarkun: every phase can alter $out
<clever> throw in a panic=30, and it should reboot in the event of most failures, and go to the previous generation
<clever> and then when nixos successfully boots, change it back
<clever> gchristensen: ive had plans to play with that, and configure it to change the default as it boots nixos
<clever> gchristensen: of note, grub has a saved env thing, which can change the default, and grub can write to it while booting
<clever> main problem, is that it starts the timer on bootup, but you could comment out line 14
<clever> you can `shutdown -c` to cancel that, and `systemctl stop autoreboot.timer` to entirely stop it
<clever> at the end of every hour, it will run `shutdown -r +5`, which will reboot in 5mins
<clever> lassulus: one min
<clever> ah
<clever> execsnoop works on linux now? :O
<clever> pie__: you can also use fetchTarball for anything on github
<clever> pie__: its at ~/.cache/nix/gitv2
<clever> maybe, one sec
<clever> pie__: you sometimes need both a rev (the sha1) and a ref (a branch that contains the rev)
<clever> pie__: did you also specify a ref?

2019-08-13

<clever> and -I nixpkgs= makes it work with it missing
<clever> jlv: could be you did something else to delete it and forgot
<clever> jlv: --update is always needed after --add or --remove
<clever> jlv: that shouldnt break it
<clever> jlv: try all of the nix-channel things again, under `sudo -i`
<clever> jlv: did you run nix-channel --update yet?
<clever> vika_nezrimaya: ive had problems before, where ld needed over 3gig of ram to link, and i was on a 32bit machine, lol
<clever> ,locate libstdc++.so.6
<clever> zmlww: stdenv.cc.cc is the unwrapped gcc, and .lib is the $lib from gcc
<clever> zmlww: which .so file?
<clever> > "${pkgs.hello}/bin/hello"

2019-08-12

<clever> alienpirate5: xorg = xorg.overrideScope' (xsuper: xself: { libXres = xsuper.libXres.override....; });
<clever> lucus16: ah, and yeah, you are creating something with deps, the shell script
<clever> lucus16: nix-store -rvvv foo.drv, as root, reveals it has dependencies
<clever> found reference to 'y844c6i3l5ayhyv0g1as69dv3pwzmg3v' at offset '26'
<clever> scanning for references inside '/nix/store/pxlfgb5qf1628ydbsrj8yqbnw5b0izzl-minecraft-forge-server-1.12.2-14.23.5.2838'
<clever> lucus16: fixed-output drvs shouldnt have any dependencies
<clever> lucus16: oh
<clever> lucus16: i can reproduce the failure
<clever> lucus16: i would expect that to just work
<clever> alienpirate5: is it giving an error?
<clever> lucus16: and what command are you running to cause the failure?
<clever> alienpirate5: stdenv.mkDerivation will force all of its arguments down to just a key/value set, with strings as values, lists turn into space seperated strings
<clever> alienpirate5: both work
<clever> alienpirate5: the default configurePhase will run ./configure with the configureFlags