2018-02-20

<clever> vitiral-lap: it should be in the logs for the vpn, i would think
<clever> hask_bee_3: you could also switch to using -E, nix-shell -E 'with import <nixos-17.09> {}; stdenv.mkDerivation { name = "foo"; buildInputs = [ hello ]; }'
<clever> infinisil: you would need to properly talk to resolvconf and dhcpcd, to insert a dns override, and remove it when disconnecting
<clever> vitiral-lap: yeah, thats a common vpn problem, you have to use the vpn dns to connect to anything, but that also breaks dns when you disconnect
<clever> vitiral-lap: what did it add?
<clever> vitiral-lap: what about /etc/resolv.conf?
<clever> vitiral-lap: lines 12/13 show that you have routes for tun0, so you should be able to ping any ip in the network
<clever> hask_bee_3: nix-shell -p is hard-coded to use <nixpkgs>, so you need to use -I or NIX_PATH to setup nixpkgs to point somewhere
<clever> vitiral: does `ip addr` show it as having an address, and is it listed in `ip route` ?
<clever> vitiral: do you have a new interface in `ip link` when its ocnnected?
<clever> chreekat: try running that as root
<clever> Baughn: however, the dhcp client in some of my bios's for netboot, times out rather fast, and fails before the port fully enables
<clever> Baughn: the ethernet link is "live" for several seconds, without any routing, as it waits for SPAN broadcasts, to confirm i didnt f-up and create a cycle and broadcast storm :P
<clever> Baughn: related, ive had issues with the SPAN support in my old cisco switch
<clever> Baughn: lol
<clever> hask_bee_3: just throw it into your .bashrc and it should be good
<clever> Baughn: ah, yeah, online detection can be fun
<clever> Baughn: heh
<clever> pikajude: pkgs.runCommand
<clever> chreekat: any time you do something like import "${foo}" where foo was a derivation
<clever> chreekat: import from derivation can cause builds at eval time
<clever> freeman42x]NixOS: somebody changed the haskell expressions, and didnt re-test its effects on 784
<clever> freeman42x]NixOS: theres probably something wrong with the 784 package set
<clever> freeman42x]NixOS: line 60 says that its somehow related to loading ghc-mod
<clever> heh, the standard wall-of-text error!
<clever> freeman42x]NixOS: what do you get if you --show-trace the error?
<clever> it might be that the 784 package set is broken
<clever> freeman42x]NixOS: do you have an overrides dealing with ghc-boot?
<clever> __monty__: oh, if you just want to update the buildEnv, just -iA it again
<clever> __monty__: -e only works on names, check nix-env -q to see the names
<clever> __monty__: move?
<clever> __monty__: i think the last one should work
<clever> __monty__: under gentoo, it uses the channels from the user that installed nix
<clever> clever@c2d ~ $ echo $NIX_PATH
<clever> nixpkgs=/home/clever/.nix-defexpr/channels/nixpkgs:nixpkgs=/home/clever/.nix-defexpr/channels/nixpkgs
<clever> __monty__: it might be nixos only, let me check another machine
<clever> __monty__: so the channels are just accessible by name
<clever> __monty__: the last element in here, that is every channel on root
<clever> nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
<clever> [clever@system76:~]$ echo $NIX_PATH
<clever> hask_bee_3: also, <channelname> should work
<clever> samueldr: all i see is solid black
<clever> johnw: nix-shell doesnt check for collisions, and everybody uses them inside nix-shell
<clever> johnw: or use a buildEnv to merge things together, and set the allowCollisions flag
<clever> johnw: the right way is to not install them, but to use nix-shell
<clever> which the default.nix you first linked doesnt do
<clever> but the file has to import its own nixpkgs
<clever> that would load it from a given file
<clever> the nix-env command lets you install things without having to download any special files
<clever> its mainly for testing things out
<clever> that command will let you build most default.nix files, but it wont install anything
<clever> gem: oops, its called zeroad, so nix-env -iA nixos.zeroad
<clever> gem: if you just want to install 0ad, you can run nix-env -iA nixos.0ad and it will grab it from the nixpkgs you already have
<clever> gem: nix-build only builds things, the result goes into a symlink called result
<clever> ottidmes: ah, over a list of them, hmmm, not sure about that
<clever> gem: nix-build -E 'with import <nixpkgs> {}; callPackage ./. {}'

2018-02-19

<clever> Guanin_: also, you could do "sd${letter}1" and then drop the 'sd' and '1' from the list on 15
<clever> Guanin_: try + instead of ++
<clever> ottidmes: // will merge the set without recursion
<clever> jsgrant_: can you gist that systemd one-shot service for Guanin_?
<clever> Guanin_: and just throw a wall of bash at it
<clever> Guanin_: simplest thing i can think of, is to create a systemd service that opens things after the machine has booted
<clever> Guanin_: it looks like nixos doesnt have much support right now for opening luks devices unrelated to the rootfs, or opening things with keyfiles
<clever> Guanin_: ah, yeah, this all happens before nixos begins mounting things
<clever> angerman: sure
<clever> sphalerite_: ive already seen users run into that problem when they try to install .dev to get headers working :P
<clever> Guanin_: that will cause nixos to open the luks devices within the initrd, while booting
<clever> sphalerite_: ah, thats probably meta.outputsToInstall i think
<clever> Guanin_: to start with, youll want to look at the options in https://nixos.org/nixos/options.html#boot.initrd.luks
<clever> Guanin_: ahh, one min then
<clever> sphalerite_: id try passing an absolute path and see what happens
<clever> sphalerite_: but i did want to also make a plugin, that could mess with nix-store -q, to find the debug for any given binary, and fetch that debug off cache.nixos.org automatically
<clever> sphalerite_: last time i delt with that, i had to manually add the right storepaths to the search path
<clever> dalaing: the key detail, is that all import from derivation is broken in hydra evals
<clever> dalaing: id say yes, ive also run into the same issue last week
<clever> Guanin_: ah, is the raid array entirely seperate from the nixos root fs?
<clever> Guanin_: you will need to fill that list with every luks device you have
<clever> Guanin_: a configuration.nix entry like this, says that nvme0n1p2 is a luks device, it should be opened under the name root, and it should be opened before lvm is initialized
<clever> Guanin_: boot.initrd.luks.devices = [ { name = "root"; device = "/dev/nvme0n1p2"; preLVM = true; } ];
<clever> Guanin_: of what OS?
<clever> Guanin_: but luks isnt auto-detected, youll need to add something like this to configuration.nix: ....
<clever> Guanin_: then read the config it generates in /mnt/etc/nixos/, it configures some of it for you
<clever> Guanin_: to start with, you will want to manually unlock all 11 luks devices, and assemble the mdadm raid, then mount it to the right spot under /mnt/, and run nixos-generate-config --root /mnt/
<clever> fragamus: nix-shell -p stack2nix, then use it to generate a default.nix, and leave that shell, then you can just nix-build -A project, to build a given cabal project inside the stack project
<clever> fragamus: in general, you shouldnt put development stuff into configuration.nix, but open a nix-shell with them
<clever> dalaing: cabal2nix should work fine, its callCabal2nix that causes the issue
<clever> fragamus: the ghc flags in the stack file are ignored
<clever> infinisil: also, stack leaves things linking into the store in .stack-work, and then garbage collection breaks builds
<clever> fragamus: i also prefer always building with nix, and just basically ignoring stack entirely
<clever> niksnut: looks like you already found a lot of edge cases i hadnt thought about, my initial idea was to just tweak the forceValue implementation so it wouldnt falsely detect another thread's blackhole
<clever> so it can fully resolve the toplevel derivation, but still return the entire tree, if you wish to do more complex things later on in the expression
<clever> niksnut: and also something to actually return, just: systems
<clever> niksnut: my idea, was to treat parallelMap similar to trace, you give it a list of thunks that you forceValue, like: map (x: x.config.system.build.toplevel) systems
<clever> LnL: memoise looks simple, but you have to insert it everywhere you want gains, one of the other ideas i had was to alter the parser, to just memoize everything
<clever> caching thunks and their outputs
<clever> LnL: ahhh, thats a second half of what i was planning, that would be a lot more of an invasive change
<clever> LnL: ah, ise, thats why i didnt find it with a quick search
<clever> ah
<clever> LnL: do you have more details?
<clever> LnL: nope
<clever> hask_bee_3: yeah, that should be fine
<clever> niksnut: what do you think about adding a parallel map, to speed up the example in that gist?
<clever> given enough cores, it could reduce a 36 second job down to 2 seconds
<clever> LnL: as an example, i think it would be very simple to perform this map in parallel: https://gist.github.com/cleverca22/c2d134c315b0b02d8d7807034735a326
<clever> hask_bee_3: also, apple is naughty, sudo sets HOME to the wrong value, so the command i gave above listed the channels for the wrong user
<clever> hask_bee_3: ah, then your most likely on the nixpkgs-unstable channel, which tests that basic things work on all platforms
<clever> hask_bee_3: which distro are you on?
<clever> hask_bee_3: that depends on which channel your on, what does `sudo nix-channel --list` say?
<clever> via https://github.com/NixOS/nixpkgs-channels/commit/e4e1f0462f6 i can see the commit exists only in the nixos-unstable-small and nixpkgs-unstable branches
<clever> the code should work on all platforms, but the testing has only ran for some
<clever> hask_bee_3: e4e1f0462f6 is the git revision
<clever> hask_bee_3: yeah, run realpath on that
<clever> disasm: hmmm, i should look into those...
<clever> hask_bee_3: what is the absolute path to that nixpkgs?
<clever> disasm: qemu doesnt support dynamically changing the resolution of the guest gpu so seamlessly
<clever> the guest tools work surprisingly well, resizing the virtual gpu to match the window size and syncing the clipboard
<clever> but there is not hot-plugging of monitors, so i havent noticed the above issue
<clever> i still use it when i need to run a windows VM on my laptop
<clever> LnL: i have an idea i was thinking of, allowing nix to use threads to speed up an eval
<clever> dtz: which commit is doing IFD?
<clever> Dezgeg: thats where qemu-user + cross-compile could come in handy, cross-compile for performace, qemu-user so ./foo works
<clever> Dezgeg: once for the host, then depend on itself, to generate the target docs
<clever> Dezgeg: you would need to build the current package twice, lol
<clever> Dezgeg: oh, right, ./foo, ow
<clever> Dezgeg: it would need to put help2man in the nativeBuildInputs, so nix knows to provide the right build of help2man
<clever> thoughtpolice: qemu-user just magically allows an x86-linux kernel to run arm-linux binaries
<clever> thoughtpolice: qemu-user can do that with less overhead
<clever> thoughtpolice: and they will want to rebuild the world, natively, on a slow arm board
<clever> thoughtpolice: so nix-env and nixos-rebuild will refuse to link against the cross-compiled libraries
<clever> thoughtpolice: the biggest problem with any cross-compile in nix, is that it has a different hash from a native compile
<clever> shlevy: the nixos expressions already boot a vm to make disk images
<clever> dgpratt: the driver gets restarted when display-manager restarts
<clever> fearlessKim[m]: if you want it to effect nix-build, it has to go into your config.nix
<clever> no need to edit PATH itself
<clever> maurer: manually run the /run/current-system/sw/bin/nix-env for the uninstall
<clever> maurer: the nix in the os was updated, and that nix hasnt updated, so your mixing nix's
<clever> maurer: uninstall that nix
<clever> maurer: what does `type nix-shell` say?
<clever> maurer: hmmm, i would expect that to work
<clever> maurer: have you recently changed nix.package or nixpkgs?
<clever> maurer: are you mixing nix versions?
<clever> so if it winds up broken, the build fails
<clever> test that the commands work in a check phase?
<clever> Profpatsch: one option is to switch to a proper patch, then it will fail safe
<clever> genesis: thats a bug with the new nix 2.0 stuff, its getting fragments of the curl output, and then appending \n's to them
<clever> then just `fg` will resume it, and finish the previous command
<clever> ah
<clever> ctrl+z?
<clever> if you kill the nix-env, the nix-daemon should clean the locks up automatically
<clever> why hasnt it finished?
<clever> ps aux | grep 2981
<clever> genesis: and then ps aux | grep 2986
<clever> stop the nix-env, then as root, check "ls -l /proc/*/fd/* | grep 7h5a7p7y8jc0pbzj057hn4i1ibvia7cc"
<clever> genesis: does /nix/store/7h5a7p7y8jc0pbzj057hn4i1ibvia7cc-golly-3.1.lock exist?
<clever> genesis: try running it with -vvv and see what it says
<clever> genesis: any use of build slaves?
<clever> genesis: is this with hydra or nix-build on CLI?
<clever> ive had to do that once before
<clever> sphalerite_: 'config.foo."a.b"' i think
<clever> nope
<clever> sphalerite_: hmmm, crazy idea...
<clever> sphalerite_: yep, very first thing it runs is xdg-open
<clever> [pid 26834] execve("/run/current-system/sw/bin/xdg-open", ["/run/current-system/sw/bin/xdg-o"..., "https://nixos.org/nixos/options."...], 0x32164e0 /* 65 vars */) = 0
<clever> let me strace it again
<clever> sphalerite_: from past debug, i know it uses xdg-open
<clever> sphalerite_: xdg-open works fine from a shell
<clever> sphalerite_: oh, and i just remembered, chrome is in nix-env due to other things, maybe teamspeak can only search /run/current-system/ ?
<clever> teamspeak opens things in firefox, but chrome is the default
<clever> sphalerite_: ive also noticed a weird bug with opening links lately
<clever> make sure it boots before you GC it to death
<clever> sphalerite_: thats one of the few ways to brick nixos :P
<clever> lol
<clever> your going to find outputs from things that you already fixed :P
<clever> that should limit it to the current closure
<clever> sphalerite_: one thing that helps, grep -r /usr/ $(nix-store -qR /run/current-system)
<clever> yep
<clever> schoppenhauer: maybe -lboost_system ?
<clever> schoppenhauer: which component of boost are you trying to use?
<clever> schoppenhauer: boost doesnt have a libboost.so
<clever> hask_bee_3: it can also exist outside of /nix
<clever> hask_bee_3: nix-instantiate --find-file nixpkgs, and echo $NIX_PATH
<clever> schoppenhauer: and which #include is failing?
<clever> sphalerite_: what arguments are you using with nix-shell?
<clever> schoppenhauer: are you using nix-shell?
<clever> some are

2018-02-18

<clever> dgpratt: it will try to call the file with just {} by default
<clever> dgpratt: nix-shell and nix-build only get those automatic arguments from --arg and --argstr
<clever> rtc clock*
<clever> it has a bit of battery backed sram
<clever> the rtc block on x86 machines is sometimes abused for some of that
<clever> and keeps the original failed os fully in ram
<clever> while the crashdump setup basically just boots a 2nd kernel+initrd that was kept in ram the entire time
<clever> i think thats very limited in how much storage it has
<clever> but with nixos, it just boots the normal system from that 2nd kernel
<clever> in a proper setup, it would save a dump and reboot itself
<clever> where you can then use some special tools to dump the ram
<clever> in the event of a panic, it will kexec itself over to this new kernel
<clever> samueldr: thats usually handled by a crash kernel, which nixos partially supports
<clever> jsgrant: if you have grub available, try enabling memtest86, and giving it a spin
<clever> jsgrant: kernel panics cant be captured by coredumpd
<clever> jsgrant: how exactly is it crashing?
<clever> jsgrant: it should persist between reboots
<clever> steveeJ: runAsRoot has a pretty heavy performance cost, so its usually better to generate the +s bit at runtime
<clever> steveeJ: thats running inside the nix sandbox, via qemu
<clever> steveeJ: oh, runAsRoot, thats not running in docker
<clever> fragamus: it converts your stack.yaml into a default.nix, then nix does everything
<clever> fragamus: i prefer using stack2nix
<clever> earldouglas: you could put a path to ~/.nix-profile/share/gnuradio/grc/blocks, and then install it with nix-env
<clever> steveeJ: not really
<clever> steveeJ: yeah, that gives the binary, which will rely on being ran as root
<clever> but in my case, i just nix-build as non-root, or even with hydra, and it works
<clever> ah, that works somewhat
<clever> but if you use a patched x86 daemon, you can run both at once
<clever> also, if you run the risc daemon, you cant do x86 builds :P
<clever> so the x86 daemon will run things from the "wrong" arch
<clever> shlevy: this lets you configure the extra platforms in nix.conf
<clever> shlevy: thats what my nix patch is for
<clever> then qemu wont have to deal with clone
<clever> shlevy: maybe use an x86 nix-daemon?
<clever> shlevy: ah
<clever> shlevy: and configuration.nix has a field for that
<clever> build-sandbox-paths = /nix/store/kvr2ihqfp5lhnsyh606bfrpkxb7saad0-qemu-user-arm-2.7.0 /bin/sh=/nix/store/nkq0n2m4shlbdvdq0qijib5zyzgmn0vq-bash-4.4-p12/bin/bash /nix/store/1zv5dwifxg5fh08gif8ld3h9f40y8czh-glibc-2.
<clever> shlevy: there is a nix.conf to inject things into the sandbox
<clever> steveeJ: so the docker scripts would need to recreate similar files before starting the non-root stuff
<clever> steveeJ: it gets created on bootup, by a process that has root
<clever> fragamus: check the ~/.stack directory and see where that string from the error is held
<clever> fragamus: also, id avoid running that kind of stuff as root, just out of habbit
<clever> and coredumpctl lets you list and gdb them
<clever> jsgrant: they land here
<clever> [root@amd-nixos:~]# ls -ltrh /var/lib/systemd/coredump/
<clever> jsgrant: i have that on with a few machines, helps debug random things
<clever> fragamus: try using a proper stack.yaml then, it might only be the ghci command that is broken
<clever> fragamus: if you just want ghci, you dont even need stack, nix-shell -p haskellPackages.ghc --run ghci
<clever> fragamus: try doing `nix-channel --update` then `nix-env -iA nixos.stack` again, does it give a newer version?
<clever> fragamus: what does nix-channel --list say?
<clever> jsgrant: i think that will do it all
<clever> systemd.services.fixit = { script = "echo 'disable' > /sys/firmware/acpi/interrupts/gpe13"; serviceConfig.Type = "oneshot"; serviceConfig.RemainAfterExit = true;
<clever> and you can use .script to inline the whole thing
<clever> jsgrant: if you set the oneshot type on a systemd service, it will just run the script once at startup, and consider it running
<clever> *looks*
<clever> jsgrant: if you manually run that echo, does it work?
<clever> jsgrant: at 14:54, you said 13, but at 15:01, you said 14
<clever> jsgrant: that says 14, not 13
<clever> fragamus: nix-env -iA nixos.stack and stack --nix
<clever> jsgrant: id leave it disabled then, and see what happens
<clever> fragamus: you need to work with the nix tools, not against them
<clever> jsgrant: how do you know its gpe13 causing the fault?
<clever> fragamus: what part isnt working right?
<clever> and the other answer depends heavily on what /proc/interrupts blames it on
<clever> jsgrant: id use a one-shot systemd service to do the same thing
<clever> jsgrant: does /proc/interrupts blame that irq on any piece of hardware?
<clever> sphalerite_: oh yeah, i saw that in the nix/release.nix, it got in my way when i tried to build nix 2.0 with 1.11 a few days ago
<clever> thats the file nix-channel downloads
<clever> symphorien: or you can directly use https://nixos.org/channels/nixos-unstable/nixexprs.tar.gz
<clever> symphorien: thats a channel url, it has to be added to nix-channel
<clever> symphorien: if you ran the bundle as root, it could just hijack the relevant arches in binfmt-misc, and then fire up a nix-daemon
<clever> i'm thinking of a json config file, so it can do everything
<clever> and what you do depends on what you want
<clever> but the $HOME isnt fixed yet
<clever> simpson: the /home mount is already fixed upstream, nixpkgs just needs a bump
<clever> so its rather difficult to actually run a usable application inside it
<clever> simpson: and both versions mess with $HOME
<clever> simpson: oh, and a warning, the nix-bundle in nixpkgs, doesnt mount /home to the sandbox
<clever> simpson: all the shell script did was import <nixpkgs> and use the given arg to index pkgs.
<clever> then pass it a derivation
<clever> simpson: just skip the nix-bundle shell script, and import nix-bundle's default.nix directly
<clever> simpson: ive solved that
<clever> simpson: that gives me an idea, if nix-bundle has root, it can configure binfmt-misc, and run things under a mount namespace
<clever> samueldr: 6/7 i mean
<clever> shlevy: and it also includes a nix patch to allow the x86 nix-daemon to run arm binaries
<clever> shlevy: oops, ^
<clever> sphalerite_: this generates qemu-user's for armv7/8 and aarch64
<clever> sphalerite_: youve probably seen my qemu-user stuff?
<clever> just forceValue() each item in the list, in seperate threads
<clever> i think so
<clever> sphalerite_: that reminds me, i had an idea for a new builtin, par
<clever> :D
<clever> yonk_: ah, that is probably it
<clever> yonk_: what is in your hardware-configuration.nix file?
<clever> yonk_: so it cant run any 32bit binaries
<clever> yonk_: you somehow have 32bit support turned off in the kernel
<clever> # CONFIG_IA32_EMULATION is not set
<clever> sphalerite_: but if you know which derivation is failing a lot, you could config.nix package-override just that
<clever> sphalerite_: oh
<clever> rebuild the world, at least once
<clever> but adding that to a derivation, changes the hash, so you get zero help from the binary cache
<clever> that allows nix to remember it
<clever> sphalerite_: if you set succeedOnFailure=true; on a derivation, it will still succeed, even upon failure, and create a $out/nix-support/failed file
<clever> sphalerite_: sorta, but the change i have in mind also breaks the binary cache
<clever> yonk_: nothing looks abnormal in that config
<clever> yonk_: and also nix-shell -p gist followed by `cat /proc/config.gz | gunzip | gist -p -`