2017-01-26

<clever> Unode: vmTools.runInLinuxVM i believe
<clever> DavidEGrayson: it did need some patches like https://github.com/taktoa/arcane-chat/blob/master/fixes/qtsvg-epsilon.patch
<clever> copumpkin: yep, entirely schemaless
<clever> nh2_: yeah, one anoying problem with the nixpkgs config, is that it has no checking for invalid entries
<clever> xargs needs to be used within nix-push
<clever> yeah
<clever> ahh
<clever> you could nix-copy-closure the paths to the linux http server, and then nix-serve from that?
<clever> ah
<clever> johnw: nix-serve is another option for a binary cache
<clever> ah
<clever> johnw: xargs will inteligently check the limits, and break it up into multiple commands
<clever> johnw: readlink -f ~/.nix-profile | xargs nix-push ...
<clever> nh2_: it will obey the overrides in nixpkgs.config.packageOverrides, set within configuration.nix
<clever> DavidEGrayson: qtbase includes core, gui, network, opengl, sql, widgets, and some other misc things
<clever> DavidEGrayson: looks like it took my main desktop 33mins to cross-compile qtbase 5.6.1
<clever> let me see
<clever> cross compiling qt and gstreamer
<clever> yeah
<clever> looks like an issue in gdk-pixbuf is breaking the current build, but there are still a large number of other things fixed
<clever> gdk-pixbuf-print-mime-types.c:1:35: fatal error: gdk-pixbuf/gdk-pixbuf.h: No such file or directory
<clever> gstreamer is still cross-compiling for windows, but the actual project is failing right now
<clever> DavidEGrayson: http://hydra.earthtools.ca/jobset/arcane-chat/release-16.09#tabs-jobs and i have a hydra buildint it
<clever> Sonarpulse-Work: https://github.com/taktoa/arcane-chat/blob/master/default.nix this project has a number of fixes to things all over nixpkgs, to get the project to cross-compile to windows
<clever> nh2_: thats pretty much identical to my gist
<clever> eacameron: https://gist.github.com/cleverca22/593326d8f81907dc9059d36c043c7f7a this is how i currently have gpg handling ssh-agent duties
<clever> eacameron: shouldnt be that hard
<clever> and if all sessions close, it stops
<clever> nh2_: it appears to be done via a systemd user service, so it gets ran as the correct user, the first time you open a session
<clever> nh2_: the instant radvd started on my router, this route appeared in my desktop, and :d2df is the link-local of my router's LAN interface
<clever> default via fe80::230:48ff:fec5:d2df dev enp3s0 proto ra metric 1024 expires 286sec hoplimit 64 pref high
<clever> 2001:470:1d:19a::/64 dev enp3s0 proto kernel metric 256 expires 86386sec pref medium
<clever> nh2_: heh, cant find a single machine i control with v6 running right now, let me flip the tunnel back on
<clever> nh2_: they may have done some manual config for you
<clever> nh2_: first thing i can think of is to double-check /etc/network/interfaces on the ubuntu system
<clever> nh2_: sounds like the routing didnt get configured correctly, do you know if the network used dhcpv6 or radvd?
<clever> nh2_: does it have a publicly routable or a link-local ip in "ip -6 addr" ?
<clever> nh2_: do you see v6 routing entries in "ip -6 route" ?
<clever> ah
<clever> Dezgeg: ah, youve been working on it also?
<clever> gchristensen: i should look into getting aarch64 on my rpi3
<clever> :O
<clever> chpatrick: if you ld-preload it like this, you can remap paths wherever you want
<clever> this util may work
<clever> chpatrick: does it want to write to /opt at build-time or runtime?
<clever> kostja: did you always install nixUnstable, or did you maybe install .nix by chance?
<clever> which made the system essentialy unfixable
<clever> along with the dpkg database
<clever> but a large chunk of the main lv was on that bad disk
<clever> it died about a year ago, about 4 of the LV's could be recovered
<clever> because i was too resize happy, and constantly adding "new" drives to the array
<clever> i had a 500gig lvm array, that was in 400 segments
<clever> avn: yeah, this is experience from before i knew of zfs
<clever> avn: the PE numbers are also in the same unit pvmove operates on, so you can use pvmove to shuffle segments around manualy
<clever> which state that each LV is a single segment
<clever> avn: the key parts, are lines 54 and 75
<clever> avn: http://pastebin.com/JUvaJJV2 here is a LVM from a backup i recently made
<clever> but that depends heavily on what is writing to it
<clever> if you can stop the writes to sda, you might speed it up
<clever> and its writing data at the same time
<clever> so you are doing just over 100 reads/sec, totaling about 3mb/sec
<clever> i have even written a tool to defrag it before
<clever> it is trivial to see the fragmentation in lvm
<clever> these 6
<clever> rrqm/s wrqm/s r/s w/s rkB/s wkB/s
<clever> avn: what kind of operation/sec and mb/sec numbers is it showing?
<clever> avn: sounds like its either seek times, or just the drive itself not able to keep up
<clever> avn: i would start with iostat -x 30, and see if the util% or wait columns are high
<clever> corngood: i have seen other users add build-cores to extraOptions, and now nix.conf contains 2 build-cores entries
<clever> it is a bit off that the anmes are similar
<clever> corngood: you want nix.config.buildCores
<clever> corngood: that will cause some issues
<clever> grantwu: depends on the state of -j, i usualy -j 8 to make things go faster
<clever> or a lambda
<clever> but the value can be any primitive type, number, boolean, string, derivation, list, attribute set
<clever> grantwu: in these cases, it is
<clever> grantwu: this provides the attribute names for nearly every package in nixpkgs
<clever> grantwu: at the top level, nixpkgs has this attribute set: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix
<clever> grantwu: nix-env -iA tells it exactly which package to use, so it finds it much faster
<clever> grantwu: a derivation is a package, and an attribtute is a key=value pair
<clever> grantwu: nix-env -i will search the .name attribute of every derivation for a match
<clever> xpika: nix is incapable of using what is "currently installed" inside builds, it can only use the versions defined within the nix expressions

2017-01-24

<clever> declarative or bust!
<clever> philipp[m]: potentialy related, at a glance, i think thats for imperatively made timers, which nixos has probably disabled?
<clever> eek, i really need to update my router!
<clever> its got 228...
<clever> is it a normal SD card in a slot, or part of the laptop?
<clever> what grade of SD card is it?
<clever> it had to wait 12.5 seconds for a command at one point
<clever> definitely looks like the SD card is the bottleneck at times
<clever> corngood: the first output iostat makes is the average since bootup, the 2nd sample onwards, is averaged over the number it was given
<clever> swflint: thats just the average since bootup, need to wait 30 seconds for a real sample to appear
<clever> swflint: nix-shell -p sysstat
<clever> swflint: iostat can help check the block device load, iostat -x 30, let it run for a few mins, then pastebin the output
<clever> ah
<clever> gchristensen: on what hardware?
<clever> only 1 physical drive
<clever> avn: so the only thing lvm is doing is partitioning up a luks volume
<clever> avn: main reason i went with zfs on lvm, is because i wanted swap on the same luks, but i didnt want to deal with swap on a zvol
<clever> avn: havent messed with any of the tuning yet
<clever> avn: my laptop has zfs on lvm on luks
<clever> yeah, i believe it applies to both
<clever> this is how i was forcing debug info on one of my projects
<clever> chpatrick: NIX_CFLAGS_COMPILE = [ "-ggdb -Og" ];
<clever> chpatrick: it should always be used, let me dig up another example
<clever> chpatrick: this is a part of the gcc wrapper used by nix to inject all of the -L and -I's for buildInputs
<clever> chpatrick: NIX_CFLAGS = [ "-march=${cpuMarch} -O3 -g" ];
<clever> chpatrick: oh, another option, let me dig it up
<clever> chpatrick: can you pastebin some of the ways you tried it, and the errors?
<clever> chpatrick: any time you add cmake to the buildInputs, the stdenv will source this file, which altars how builds get done: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/build-managers/cmake/setup-hook.sh
<clever> it may need more quotes in quotes, since i think you want a space and several flags there
<clever> so you can do cmakeFlags = [ "-DCMAKE_C_FLAGS_RELEASE=-march=${cpuMarch}" ];
<clever> chpatrick: the cmake hook will respect cmakeFlags
<clever> the generated files are making it harder to add customizations to the nix expressions
<clever> has anybody here done anything complex with node2nix?
<clever> mbrgm: fetchFromGitHub just generates a url to a tarball on github

2017-01-23

<clever> lassulus: and its 7am, i should get to bed, good luck
<clever> but i havent confirmed this feature in grub
<clever> its usualy triggered by just setting the initrd path twice
<clever> then the key is in the initrd only at runtime
<clever> lassulus: so you could have a 2nd initrd file, root-only, with just the keyfile, that grub will read from /boot and append to the initrd
<clever> lassulus: some bootloaders (possibly including grub) can append a 2nd CPIO archive to the initrd
<clever> lassulus: there are some more advanced things that might apply
<clever> lassulus: oh right
<clever> heh
<clever> but that requires a reinstall
<clever> lassulus: related to my 2nd answer above, make 2 partitions, an encrypted /boot, and an encrypted /
<clever> lassulus: luks then contains lvm, and one of the LV's contains ZFS
<clever> lassulus: similar to my laptop, on the top level i have a plaintext /boot, and a luks partition
<clever> dweller: thats similar to my original answer, and now the key is in /nix/store for all to see
<clever> so you have a single / partition, and the grub decrypts it once via passphrase, then linux needs it again
<clever> ahh
<clever> so you can make it root-only
<clever> lassulus: this keeps the keyfile directly on /boot and unmanaged by nix
<clever> lassulus: "simplest" safe option i can think of on the spot, is to put the rootfs keyfile on /boot/, and then using something similar to my iscsi stuff, mount /boot before /, read the keyfile out, then umount /boot
<clever> 2017-01-23 07:04:38 < lassulus> /boot is encrypted
<clever> the initrd gets built by nix, so all of its inputs must be world-readable
<clever> and now the keyfile is a dependency of your luks config, and just gets added to the initrd automaticaly
<clever> and the file becomes world-readable
<clever> any time you put a raw path in like that, nix will import the file to /nix/store, and convert the entry into its /nix/store path, as a string
<clever> so boot.initrd.luks.device.foo.keyFile = ./keyfile.bin;
<clever> if you use the keyfile path unquoted in configuration.nix, it will just happen automagicaly
<clever> ah
<clever> enless you have /boot also encrypted?
<clever> but then anybody that can read /boot can get the keyfile and there goes the whole point of luks
<clever> ah
<clever> lassulus: but it also depends on what kind of file you want to add, and why
<clever> line 56 then connects to iscsi drives, allowing the existing stuff to find a rootfs over that
<clever> and because it references a part of iscsi, the iscsi package is included into the initrd automaticaly
<clever> this inserts a bit of bash script that gets ran before the initrd tries to bring LVM online
<clever> yes
<clever> which one was the new version, npm2nix or node2nix?

2017-01-22

<clever> so less of a rebuild the world thing
<clever> and no others
<clever> the nix-build i gave only gives debug for the top level derivation you name
<clever> though the eelco msg implies it should have worked, and given debug for EVERYTHING
<clever> i think he just set an env var for the entire system, that has no effect
<clever> Unode: and glancing at that issue you linked, i think he enabled the wrong option
<clever> in some packages, you need more override flags
<clever> Unode: that function will altar the build flags to include debug symbols
<clever> i believe
<clever> Unode: nix-build -E 'with import <nixpkgs> {}; enableDebugging hello;'
<clever> Unode: manualy read the wrapper, set the env variables in your shell, then run gdb on the original ELF

2017-01-21

<clever> 2014.... to me... lol
<clever> ah, thats new
<clever> from what i remember, ntpdate is to set it once as fast as possible, while ntpd is to give it time to get a lock, and keep it locked
<clever> Ankhers: that should perfectly set the clock for you
<clever> Ankhers: i would just manualy run ntpdate against an ntp server
<clever> i have since switched that laptop to an internal copy of nixos, it now has ZFS on LVM on LUKS, with a plaintext /boot, all ontop of GPT
<clever> and then a copy of iscsistart in the initrd is enough to make linux happy
<clever> and that gets it far enough to load the kernel+initrd
<clever> so grub legacy boots via the legacy bios api, thinking its a local drive the entire time
<clever> ipxe uses iscsi to open the root hdd over the LAN, and it then hijacked the legacy bios API for the primary master hdd, and ran the MBR
<clever> i have booted my laptop with ipxe + iscsi + grub legacy + gpt
<clever> as for weird things ive done with grub
<clever> memtest86 on nixos-unstable gives false errors
<clever> the gcc hardening in nixpkgs
<clever> except, memtest still said the ram in 3 other systems was also bad
<clever> MichaelRaskin: even if i swapped it for ram from another pc
<clever> MichaelRaskin: and the entire reason i had to shuffle the drives, memtest86 said the ram in my desktop was bad
<clever> the SSD's failed to boot on their own
<clever> until the drives got shuffled about
<clever> and a random magnetic in the box was holding the MBR
<clever> turns out, the partition label was bios boot partition, but it had the wrong typecode
<clever> and used hexdump to confirm things
<clever> i recently had to fix the MBR on one of my drives
<clever> MichaelRaskin: the guid type code for the "bios boot partition", when converted to ascii, is "Hah!IdontNeedEFI"
<clever> MichaelRaskin: http://imgur.com/a/lfuRB
<clever> that partition has no filesystem, grub just writes the raw stage 1.5 executable directly to it
<clever> MichaelRaskin: GPT legacy solves that, by forcing you to put stage 1.5 into a dedicated "bios boot partition"
<clever> MichaelRaskin: yeah
<clever> MichaelRaskin: and then used it to decode an MBR on an actual disk, and figure out where stage 1.5 was
<clever> MichaelRaskin: ive even gotten a little bored, and i read the assembly behind the stub in the MBR
<clever> MichaelRaskin: ive read the entire info doc on grub before, so i'm familiar with how grub works
<clever> MichaelRaskin: yep, and in that case, it was just a /boot/ missing, so you could have just fixed it from grub's edit menu
<clever> so you can do any testing you want, without risking the stablity of the host
<clever> xwvvvvwx: this will generate a bash script that runs the resulting nixos under qemu
<clever> xwvvvvwx: nixos-rebuild -I nixpkgs=~/apps/nixpkgs build-vm
<clever> if you dont need to test driver stuff, you can cheat in a safe way
<clever> and it also broke the magic rollback from grub that makes nixos great
<clever> many months ago, there was a wave of people running nixpkgs-unstable, and it was eating grub.cfg, leaving their systems unbootable
<clever> i run nixos-unstable on my systems
<clever> xwvvvvwx: nixos-unstable updates when a set of tests pass, to certify it wont horidly break a nixos machine
<clever> xwvvvvwx: nixpkgs-unstable updates whenever hydra has finished trying to build everything
<clever> xwvvvvwx: you can also use -I to override things, -I nixpkgs=~/apps/nixpkgs/
<clever> yeah, its the daemon that will need NIX_BUILD_HOOK/NIX_REMOTE_SYSTEMS set, not the slave
<clever> jophish_: NIX_REMOTE_SYSTEMS as well?
<clever> or the graphics memory if its in a graphical mode
<clever> those typicaly work by scraping the text memory for the GPU
<clever> Unode: the server appears to already have this physicaly installed, i saw its keyboard in lsusb
<clever> Unode: the hardware for that does not appear to be configured, or even plugged in
<clever> so now i'm having to explain to support that the remote-console IPMI has to be enabled, lol
<clever> nixos has since booted up, http://imgur.com/a/jhS7r but it is unresponsive to the network
<clever> and without a console, i had no way of knowing/doing that until i opened a support ticket
<clever> and upon rebooting, the raid card got upset, and wanted to re-import the config
<clever> i recently installed nixos over an old 2015 ubuntu at racklodge
<clever> 16gig
<clever> but i'm currently trying to walk some datacenter support guys thru the process of doing their job, lol
<clever> id need to dig it out of mothballs to try things again
<clever> Unode: i believe it happened even with just 1 mod installed, and only the mod UI's where bugged, the native stuff worked fine
<clever> http://imgur.com/ys7kFOU have fun trying to play this :P
<clever> and without apoaps/periaps visible, the game is near unplayable
<clever> installing MS fonts on nixos does not solve the problem
<clever> first time ive ever seen cross-platform done so well, all platforms have the same bug, lol
<clever> all text within mods is missing
<clever> running the native linux version, and the windows version under wine results in identical problems
<clever> ive also run into insane font problems with KSP
<clever> yay
<clever> i can paste a link to my copy
<clever> i was able to download it in just 18 seconds
<clever> YellowOnion_: how fast is it from here?
<clever> (that path came from your nixos-rebuild pastebin)
<clever> justanotheruser: if you want the compile-time graph, you need "nix-store -q --tree /nix/store/gvfhv333z17zs8b1spw27wpdyhw3rbpm-nixos-system-dawn-16.09.1512.6b28bd0.drv"
<clever> thats the runtime graph, not the compile-time graph
<clever> justanotheruser: cudatoolkit probably depends on the cudnn7 version
<clever> gchristensen: part of it depends on the read to insert ratio
<clever> justanotheruser: can you gist the full configuration.nix and nixos-rebuild output?
<clever> gchristensen: ah, i sometimes do that kind of thing with mysql, havent really looked into hydra's pgsql db yet
<clever> justanotheruser: review the contents of your configuration.nix and any files it references
<clever> justanotheruser: something elsewhere in your system is referencing cudann7
<clever> gchristensen: also, i ran this against a racklodge server lastnight, it booted up just fine, and i was able to image the entire sda, and i plan to install nixos next
<clever> gchristensen: i could have it boot a 64bit kernel from a 32bit guest
<clever> gchristensen: it would be a bit more complex, but if i use a 32bit shell, kexectools, and cpio in https://github.com/cleverca22/nix-tests/blob/master/kexec/configuration.nix#L17
<clever> its pretty hard to break /nix, and you would want to keep /etc/nixos or youll have to redo all the config
<clever> and this actualy gives me an idea
<clever> you dont have to format, it will just make a 64bit variant from your existing configuration.nix, and update
<clever> i have upgraded from 32 to 64 before with just nixos-rebuild, but its far simpler to just boot a 64bit ISO and re-run nixos-install
<clever> i686 is 32bit
<clever> but it should still run 64bit code faster then 32bit code
<clever> to me, it sounds like somebody made a 64bit cpu with a 32bit pinout, so it could work on older 32bit motherboards
<clever> moet: yep, so it can run 64bit code, but its got a hard limit of 4 gig of ram
<clever> moet: 64bit cpu, with a 32bit address bus on the mobo
<clever> cudnn = pkgs.callPackage ./install-cudnn.nix {};
<clever> justanotheruser: because like 6 says the name will just be cudnn
<clever> and also this
<clever> address sizes : 48 bits physical, 48 bits virtual
<clever> moet: look for lm (long mode) in /proc/cpuinfo
<clever> line 6 of the last gist creates a new entry for cudnn8, and calls it just "cudnn"
<clever> justanotheruser: if using configuration.nix, it would look like this: https://gist.github.com/cleverca22/ed3dc79e5f427343cf57ac5b035ba036
<clever> justanotheruser: https://gist.github.com/cleverca22/ed3dc79e5f427343cf57ac5b035ba036 put both of these files into ~/.nixpkgs/ and then nix-env -iA nixos.cudnn
<clever> no, but if you add it to config.nix like i did with toxvpn, you can act like it was
<clever> justanotheruser: http://pastebin.com/f3GwsE5Y a part of my config.nix, doing the same thing for toxvpn
<clever> and months later, when you want to rebuilt it for whatever reason, you dont have to remember the exact command we used previously
<clever> justanotheruser: something else that will both help testing, and save you trouble down the road, is to install it as a packageOverride in ~/.nixpkgs/config.nix
<clever> then you can just nix-env -iA nixos.cudnn
<clever> justan0theruser: and further down, you want tar -xzvf $src, otherwise the build will fail when the sandbox is enabled
<clever> justan0theruser: are you just testing it, or do you want to install it?
<clever> even with xorg disabled
<clever> it will still read services.xserver.videoDrivers to figure out which drivers to use
<clever> but since its headless, you didnt enable xorg
<clever> normaly, enabling xorg will do that for you, along with configuring the right driver automaticaly
<clever> dhess: it needs hardware.opengl.enable = true; to create that symlink
<clever> dhess: one min
<clever> yeah
<clever> maybe, but copy-closure wont see the hardlink
<clever> coredumps are off by default
<clever> and if you have debug symbols enabled, pointing to the source, you now depend on the source at runtime
<clever> it even runs it on binary files, thats how it finds the elf files you depend on
<clever> yep
<clever> eacameron: nix will basicaly run the same grep command every time a build finishes, to figure out what the runtime deps are
<clever> eacameron: run this, "grep -r l557a8749l88icgwhh8g5m247zg3n3i4 /nix/store/a3cfnz9zm2dm79kvmfqaa2bmqivmlvmn-craft-app"
<clever> so if you copy the source, it will still internaly be refering to itself
<clever> eacameron: aha, line 4 tells me everything, the src refers to itself
<clever> eacameron: can you pastebin the output of --tree and point out which path you dont want?