2017-08-26

<clever> did you set nix.package in configuration.nix?
<clever> and then tries to open a file by the name of "use Nix::Config; Nix::Config::readConfig; print $Nix::Config::config{"binary-caches"};"
<clever> but with the * matching nothing, it sets the -I path to a literal "-e"
<clever> so instead of opening a literal *.txt, it just doesnt get a path
<clever> nullglob is a bash thing that the stdenv turns on to make thr stringly typed mess less of a mass
<clever> thats my guess
<clever> and now the entire args list is out of sync
<clever> then the argument eats the next argument
<clever> and because of nullglob, the string vanishes
<clever> oh
<clever> it sounds like its treating the string of perl code as a filename
<clever> not sure then
<clever> Infinisil: nixos-unstable branch of which repo?
<clever> Infinisil: are you using a channel?
<clever> hyper_ch: nope
<clever> Turion: another nix expression, either written by hand, or generated with cabal2nix
<clever> and it will automatically be able to use everything in haskellPackages, and build against the right version of ghc
<clever> so you could do paths = p: [ (p.callPackage ./custom_thing.nix {}) ];
<clever> that set also contains a callPackage function, which can be used to load up other nix expressions, like ones made via cabal2nix
<clever> yes and no
<clever> Turion: ghcWithPackages takes a single function as an argument, and it passes it a set of every package in nixpkgs (which came from hackage)
<clever> that would explain the intel_do_flush_locked in the error
<clever> nwuensche: i suspect the gpu drivers may not support hibernation
<clever> haskell dependencies have to be passed to ghcWithPackages
<clever> dont think thats related
<clever> nwuensche: the video drivers appear to have crashed
<clever> Aug 26 19:23:02 nixos xss-lock[7403]: X connection lost; exiting.
<clever> Aug 26 19:23:02 nixos display-manager[7327]: intel_do_flush_locked failed: Input/output error
<clever> Aug 26 19:23:02 nixos kernel: drm/i915: Resetting chip after gpu hang
<clever> aha
<clever> hmm, given that it happened 2 minutes before the resume, it might have been at login
<clever> nwuensche: what about this?
<clever> Aug 26 19:20:13 nixos xsession[7342]: /nix/store/m5fzkvclh7zvrcldr0gvhwp4m24v663h-terminator-1.0/lib/python2.7/site-packages/terminatorlib/window.py:386: GtkWarning: Das Symbol »terminator_active_broadcast_group« konnte nicht gefunden werden,
<clever> nwuensche: remove the -u and read more of the journal around the time of going in and out of hibernation
<clever> sphalerite: any other ideas?
<clever> and imediately after, systemd says it stopped x11
<clever> this line looks odd
<clever> Aug 26 19:23:04 nixos systemd[1]: display-manager.service: Service hold-off time over, scheduling restart.
<clever> that would explain 2 of the errors in the gist, but not the main problem
<clever> yeah, just dump it all into a new file, gist --login ; journalctl --since=today -u display-manager > logs ; gist -u https://gist.github.com/NWuensche/96f6002880e19a2b640c0694093de4a3 logs
<clever> everything in that gist happened within a 11 second period, so there is a bit of a gap in the data
<clever> nwuensche: how long was it in hibernation?
<clever> nwuensche: and at what timestamp did you resume from hibernation?
<clever> nwuensche: what about journalctl --since=today -u display-manager ?
<clever> nwuensche: check the journal and see whats up with xorg
<clever> firejail in every place, no mention of firefox
<clever> construct: firejail would be in the wrapper
<clever> check /etc/group
<clever> any gid that isnt already in use
<clever> and puts me into it
<clever> construct: the both.nix file creates the wireshark group
<clever> that lets you limit who can use the tool
<clever> construct: in the example i gave, only members of the wireshark group can execute, but the setuid bit is set, so the program becomes root
<clever> nwuensche: if the uptime is low, then it rebooted, but if the uptime is high, then only xorg crashed
<clever> nwuensche: and what is the uptime after logging in again?
<clever> construct: an example i had made for wireshark: https://gist.github.com/cleverca22/5711322b5a12311571d8e828f40f0603
<clever> ah, setuid isnt allowed within normal derivations
<clever> construct: what error did firejail return?
<clever> you would need to iterate over the paths in $storePaths, and create a rule to allow read and maybe execute on each entry
<clever> construct: 27 then acts on the entire graph
<clever> construct: line 14 generates a reference graph, and line 20 extracts every path in the closure from the graph
<clever> construct: i dont think its documented anywhere
<clever> construct: you would probably need to write something using exportReferenceGraph that allows it accessing all of its dependencies
<clever> only have*
<clever> and they have have an effect when inside a string in a nix expression
<clever> yes
<clever> and that file is usually a bash script that runs another firefox
<clever> ${pkgs.firefox}/bin/firefox is the full path, but you would then need to replace every / with a .
<clever> oh right, the path of firefox is in the store
<clever> Turion: id say start with cabal2nix, that creates a nix file that runs the entire build for you
<clever> and the special gcc bash script inserts that into the args when running the real gcc
<clever> nix-shell adds -I flags to NIX_CFLAGS_COMPILE
<clever> Turion: a nix option
<clever> Turion: installing things will never make them available to builds
<clever> teto: ahh
<clever> freeman42y: anything you could normally put into /etc/sudoers (check its man page)
<clever> and libudev
<clever> open("/nix/store/210papbs0b9qarlb4m8jjmnp3xmlz5bd-glibc-2.25/lib/libudev.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<clever> it may need libpci.so, it failed to find that
<clever> open("/nix/store/210papbs0b9qarlb4m8jjmnp3xmlz5bd-glibc-2.25/lib/libpci.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<clever> just random observations as i read the log
<clever> which it is unpacking at startup
<clever> lush: i think the GoPanda binary also contains a tar with a full load of npm modules
<clever> open("/tmp/.org.chromium.Chromium.eCyjXy/node_modules/request/examples/README.md", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 27
<clever> lush: yeah, definitely chromium based, it made a tmp dir with chromium in the name
<clever> mkdir("/tmp/.org.chromium.Chromium.eCyjXy", 0700) = 0
<clever> glancing at the binary of gopanda, i can see clear signs of v8
<clever> gist also does syntax highlighting if the filename ends in .nix
<clever> if you post an updated copy of the expression i can build it on my end and do that
<clever> id start by running it under "strace -f" and looking to see what the real failure is, the logs may not say it
<clever> nix doesnt allow setuid binaries in any package
<clever> does this thing contain an entire build of chromium??
<clever> we can guess it wants that in bin and copy it there
<clever> depends heavily on where its expecting the files
<clever> to $out/bin/
<clever> which is a single file
<clever> 78 only copies GoPanda2
<clever> it should also copy icudtl.dat
<clever> lush: do you see how line 77 and 78 copy the locales and the main binary?
<clever> lush: can you post the current nix expression on https://gist.github.com/?
<clever> lol
<clever> gchristensen: dont know of any services that do that, but it should be simple to make an irc bot that does that
<clever> lush: check the original package to see if icudtl.dat is somewhere?
<clever> lush: gcc.cc.lib
<clever> lush: it is in gcc, but gcc is a bash wrapper
<clever> viaken: if its a package in nixpkgs, just open a PR there
<clever> since your not doing a cross-compile, its safe to let that fail
<clever> romildo: and i think its only to find out what special flags are needed when cross-compiling
<clever> romildo: it appears to be compiling some code into conftest.o, then using file to figure out what arch it used
<clever> lush: same way you did gnome3.gconf, which i gave directions for above
<clever> ah, you linkd it above
<clever> romildo: file will never be in /usr/bin, even if it is available
<clever> gnome2.gtk.out 0 s /nix/store/rdwslb6cywp40dm9rv6aqgapfjcyrzpm-gtk+-2.24.31/lib/libgtk-x11-2.0.so
<clever> alsaLib.out 0 s /nix/store/wwgynkpy6y98wpr3xd9yf69fgw68171r-alsa-lib-1.1.2/lib/libasound.so
<clever> xlibs*
<clever> all of the low-level x libs are under xlibx
<clever> xlibs.libXi.out 0 s /nix/store/wsa2arwihgwy6mma6gsn8116zw356ly6-libXi-1.7.9/lib/libXi.so
<clever> harder to guess this one, it could have also been in cairo, and i wouldnt have guessed gnome2
<clever> gnome2.pango.out 0 s /nix/store/6hxsq6p1gskwc53k1p2ssx8jpm5c9xni-pango-1.40.4/lib/libpangocairo-1.0.so
<clever> yeah, you can sometimes guess them
<clever> fontconfig.lib 0 s /nix/store/h5z81pcppd5isqx98c8k4dznvh8rx83w-fontconfig-2.12.1-lib/lib/libfontconfig.so
<clever> romildo: read the configure script near line 7029, and see what its doing with file
<clever> lush: add gnome3 to the arguments at the top, and gnome3.gconf to the inputs
<clever> gnome3.gconf.out 0 s /nix/store/fx6rxhmcig9dqspz8gams55id3jxwj9j-gconf-3.2.6/lib/libgconf-2.so.4
<clever> yeah
<clever> i pasted that ~20 mins ago
<clever> nspr.out 22,544 x /nix/store/3k02a7f3gcbw22pvyfv38sf94vjwlfvy-nspr-4.13.1/lib/libplc4.so
<clever> ahawkins: can you gist your current expression?
<clever> lush: yeah
<clever> ah, got the name slightly off, nix-index is the package, nix-index and nix-locate are commands within it
<clever> nspr.out 22,544 x /nix/store/3k02a7f3gcbw22pvyfv38sf94vjwlfvy-nspr-4.13.1/lib/libplc4.so
<clever> lush: nix-locate
<clever> lush: before the }:, add ,nss
<clever> lush: and add nss to the function arguments near line 1
<clever> lush: so add nss to the buildInputs
<clever> nss.out 1,399,112 x /nix/store/wfgshwx9ir33xnlyhmy9fwqwy1hjm0yk-nss-3.30/lib/libnss3.so
<clever> $ nix-locate libnss3.so
<clever> lush: the package containing nss3 has to be added to the buildInputs
<clever> that gives you a shell running as root
<clever> sudo -i
<clever> freeman42x[nix1]: sudo
<clever> lush: same reason, this isnt a nixos module
<clever> lush: the nixpkgs.config is also invalid
<clever> oh
<clever> lush: where did you put the config.nix file?
<clever> its not a nixos module, so it shouldnt have that line
<clever> delete line 1 of config.nix
<clever> lush: can you put the gopanda.nix and config.nix into a gist?
<clever> lush: nix-env -iA nixos.gopanda
<clever> gspia: nix-build does help isolate a lot more problems from system-wide things
<clever> gspia: have you looked into just not using stack for the builds?, there are things like stack2nix and cabal2nix
<clever> gspia: yeah, it might need -p gcc
<clever> freeman42x[nix1]: what about this? boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta];
<clever> gspia: and having it system wide makes it half-work when you forget that, so you dont notice the problem
<clever> gspia: its more that gcc has to correctly be put into the inputs for nix-shell
<clever> any errors in dmesg? and dont paste the whole thing, lol
<clever> no changes
<clever> freeman42x[nix1]: any change in ip link?
<clever> freeman42x[nix1]: what happens when you do "sudo modprobe -v brcmfmac"
<clever> freeman42x[nix1]: yeah, one sec
<clever> lush: copy the nix expression into a file called gopanda.nix in ~/.config/nixpkgs/ and then add "gopanda = pkgs.callPackage ./gopanda.nix {};" to the package overrides in config.nix
<clever> yeah
<clever> remove gcc from systemPackages
<clever> that breaks a lot of things
<clever> outside of the nix shell, what does "type gcc" say?
<clever> gspia: and all of this was ran under "nix-shell -p zlib zlib.dev" ?
<clever> gspia: it appears to be failing to find both halves of zlib
<clever> cannot find -lz
<clever> /run/user/1000/25970-4.c:1:18: fatal error: zlib.h: No such file or directory
<clever> freeman42x[nix]: its case sensitive, extraGroups
<clever> ahawkins: and nix-env -iA nixos.mystuff
<clever> ahawkins: as an example, { packageOverrides = pkgs: { mystuff = { inherit firefox hello vim; }; }
<clever> ahawkins: use config.nix and nix-env to install a set of packages
<clever> teto: after manualy mounting /dev/sda2 to /boot, run "nixos-generate-config" and it will rebuild /etc/nixos/hardware-configuration.nix
<clever> teto: you must mount sda2 to /boot
<clever> teto: then your grub config is on /dev/sda2, not the /boot dir of sda1
<clever> ah
<clever> teto: are you booting with efi or legacy?
<clever> teto: what does fdisk say about your drive?
<clever> gspia: this flag may alos help
<clever> with the verbosity flag -v3 to see the error messages.
<clever> compiler at the preprocessing stage. In this case you can re-run configure
<clever> teto: and what arguments did you run nix-env with?
<clever> teto: is /boot mounted when you run nixos-rebuild?
<clever> may also help
<clever> gspia: the contents of /home/gspia/.cabal/logs/ghc-8.2.1/zlib-0.6.1.2-12c573b5b6af44f3fe6db28d6fb711b3953aa3469d4309a13adce662dc7f3622.log
<clever> gspia: oh right, paths are truncated, re-run it with -s 5000 as well
<clever> gspia: can you gist all of the output that strace generates?
<clever> gspia: you may also need to add -f to strace
<clever> gspia: run the failing command under "strace -e execve" and confirm what its doing to try and detect zlib
<clever> Guest51535: and joko is online
<clever> freeman42x: nix-env -iA nixos.irssi
<clever> freeman42x: what is the full line that lspci gave?
<clever> gspia: is pkgconfig at use any?
<clever> Guest51535: that will probably work
<clever> Guest51535: boot.kernelPackages = pkgs.linuxPackages_4_12;
<clever> freeman42x: then the driver isnt loading yet, what does "lspci -nn" say for the card?
<clever> once you learn the tricks, you never go back!
<clever> freeman42x[m]: does "ip link" show a wifi interface?
<clever> you can also just use the above nix-shell to temporarily use it without installing
<clever> nix-shell -p wirelesstools
<clever> freeman42x: wirelesstools.out 40,352 x /nix/store/ynhdq4ajcwb8mrjwdawr12cvza891crd-wireless-tools-29/bin/iwlist
<clever> and is stack in nix mode?
<clever> what is the exact command you are running?
<clever> just that and nothing else?
<clever> passing(
<clever> yorick: what arguments are you padding to nix-shell?
<clever> yorick: nixpkgs will add the .dev automatically
<clever> freeman42x: try "iwlist scan" first, thats a good test of the drivers
<clever> only after wpa_supplicant has connected
<clever> dmesg should include the name of the firmware

2017-08-25

<clever> oh, networking.supplicant.<name>.userControlled.enable seems to do exactly what you want, though ive never let nixos manage that config
<clever> nwuensche: did you change etworking.supplicant.<name>.configFile.path ?
<clever> so i get all of the old wifi passwords pre-entered
<clever> and my /etc/wpa_supplicant.conf isnt managed by git, i just scp the file in from another machine when doing an install
<clever> that allows wpa_cli (running as a member of wheel) to connect and query/manipulate the daemon
<clever> nwuensche: i have this line in my wpa_supplicant.conf, along with the blocks that wpa_passphrase generates
<clever> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
<clever> boomshroom: both commands cause nix to read every single file in the entire nix store
<clever> yes
<clever> and dont use the force flag
<clever> ah yeah, and it doesnt fix things, run nix-store --delete on each thing it says is bad
<clever> babs_: that file got corrupted, run nix-store --verify --check-contents
<clever> babs_: have you had any improper shutdowns recently?
<clever> babs_: what is the content of /nix/store/8zbfwjwmi0c2085527p1rndxdyxisrv5-hello-2.8.drv ?
<clever> babs_: what is the content of default.nix?
<clever> babs_: you need to run nix-build on the .nix file, not the .drv
<clever> slabity: what context is that failure happening in?
<clever> nix-repl '<nixpkgs/nixos>'
<clever> thats the line of config that triggered it
<clever> networking.wireless.interfaces = [ "wlp1s0" ];
<clever> neonfuz: this is what created the ifaces variable
<clever> neonfuz: one sec
<clever> this is what mine happens to contain
<clever> exec wpa_supplicant -s -u -Dnl80211,wext -c /etc/wpa_supplicant.conf $ifaces
<clever> ifaces="-iwlp1s0"
<clever> ah
<clever> and the value of ifaces from that script?
<clever> something in my tab-completion completed all symlinks
<clever> neonfuz: /etc/systemd/system/wpa_supplicant.service
<clever> tab completion messed up
<clever> oh wait
<clever> Fare: nixos will auto-create it
<clever> Fare: logout and then log back in
<clever> neonfuz: what arguments is it running wpa-supplicant with?
<clever> neonfuz: then cat the start script listed under ExecStart
<clever> neonfuz: [clever@eeepc1:~]$ cat /nix/store/bnl9ab56lhxznxig8c110dr5qhfvgchs-unit-script/bin/wpa_supplicant-start
<clever> Fare: wjocj iser are ypu running nix-env as, and what is the output of "ls -l ~/.nix-profile" ?
<clever> Fare: what other user?
<clever> Fare: the owner should match the name of the directory, and it should be 755
<clever> drwxr-xr-x 2 clever users 18 Aug 22 10:29 /nix/var/nix/profiles/per-user/clever/
<clever> Fare: what user owns /nix/var/nix/profiles/per-user/fare ?
<clever> neonfuz: is the driver visible in lsmod?
<clever> nix-repl> :b networkmanager_strongswan
<clever> [clever@amd-nixos:~]$ nix-repl '<nixpkgs>'
<clever> and reviewing the generated dbus config to make sure it has the right references
<clever> so everything relies on the networkmanager_strongswan having dbus files at the right path
<clever> and random config files from that range get copied into /etc at 182-202
<clever> so all of the packages listed on 109-112 get added to dbus
<clever> it also inherits everything from environment.systemPackages
<clever> yeah, nixos modules can do that
<clever> ah
<clever> and all of that is automated, so as long as you put the right package into services.dbus.packages, it just worka
<clever> which uses an xml stylesheet and xsltproc to insert the paths into an xml template
<clever> all-packages.nix- callPackage ../development/libraries/dbus/make-dbus-conf.nix {
<clever> all-packages.nix: makeDBusConf = { suidHelper, serviceDirectories }:
<clever> line 15 then passes that list to makeDBusConf, in nixpkgs
<clever> line 94 provides a base default, dbus and everything in systemPackages are in the dbus.packages by default
<clever> timclassic: it also helps to read the above dbus.nix, to see what it does
<clever> timclassic: its also in the man page, "man configuration.nix"
<clever> timclassic: https://nixos.org/nixos/options.html#dbus.package

2017-08-24

<clever> you almost always need to set both of them
<clever> neat
<clever> amdgpu didnt exist when i went thru all 2 options :P
<clever> ah
<clever> amdgpu is the one that fixed everything
<clever> dont think i tried radeon then
<clever> ah yeah
<clever> with amdgpu, everything just works
<clever> with the non-free driver (i forget the nixos name), it crashes instantly upon turning on a 2nd monitor
<clever> and several other issues
<clever> steam and obs refuse to even start due to missing opengl features
<clever> with the "ati" driver (old open-source one), i have no text in KSP mods (both native and wine)
<clever> oh, that reminds me of my issues
<clever> fun
<clever> and that wifi chip has DMA to the main cpu ram
<clever> joepie91: basicaly, if your phone tries to connect to an AP, it can execute code in your wifi chip
<clever> so you can just sniff for the ssid's they are lookign for, and spoof a router in the phones list