2017-08-04

<clever> systemd refuses to let you mount the wrong fs to /boot
<clever> nixos also gets upset when the uuid of /boot changes
<clever> resizing*
<clever> seequ: refising it can be rather tricky
<clever> nixos will put a lot of kernels and initrd's in there, and it can easily run out
<clever> maybe between 512mb and 1gig
<clever> UEFI requires a vfat filesystem for /boot, which must be on a partition of type ef00
<clever> new firmware boot process
<clever> Taneb: do you want to use EFI?
<clever> bennofs1: pkgs.path, and if you are a file inside nixpkgs, the right number of ../../'s
<clever> bennofs1: but nixpkgs always uses relative paths within itself, it will never go back to <nixpkgs>
<clever> bennofs1: then add -I nixpkgs=
<clever> Wizek: nix-env -f /home/clever/apps/nixpkgs -iA hello
<clever> <apple> "32kb is enough for anyone" lol
<clever> is that the one to fix the dyld idiocy?
<clever> grub lets you tab complete drives, partitions, and file paths
<clever> refer to my gist, and also try the tab-completion in the grub repl, hit c at the boot menu
<clever> yes
<clever> device = "/dev/sda"; and sda must contain a bios boot partition, 1mb, no fs, never mounted, in addition to the /boot partition
<clever> you can also setup both legacy and uefi if you want
<clever> device = "nodev";
<clever> mpcsh: that is only for configuring legacy booting, it must be set to "nodev" for uefi
<clever> and it will try to add grub
<clever> you can always set boot.loader.grub.enable = true; and efi enable = true;
<clever> with what error?
<clever> why not?
<clever> mpcsh: oh, grub also has an efi mode
<clever> uefi has priority over legacy in this firmware
<clever> with uefi on, it 100% ignored the boot order i configured, and refused to load a legacy linux until i physically unplugged the windows drive
<clever> i was able to just turn uefi off in my firmware
<clever> win7 is fine being chainloaded via legacy
<clever> legacy
<clever> grub
<clever> i goes years between actually using it, lol
<clever> mpcsh: yes
<clever> heh
<clever> dtzWill: not much at the moment
<clever> lol
<clever> adisbladis: it also depends on how often you update your kernel
<clever> 64mb total
<clever> for the NAS
<clever> and thats huge, my /boot is a 64mb usb stick
<clever> partition for /boot
<clever> Infinisil: grub also has a configurationLimit command to deal with this better
<clever> Infinisil: the boot sub-command rebuilds the /boot contents, based on what generations still exist
<clever> Infinisil: nix-collect-garbage only cleans up /nix/store
<clever> dtzWill: ah /boot, thats simpler
<clever> dtzWill: btrfs?
<clever> gchristensen: in this case, i would clone one and change the branch
<clever> gchristensen: hydra?
<clever> so it can back-fire both ways
<clever> and also, if LD wasnt in the env yet, that becomes a local variable, and isnt exported
<clever> state, cant get away from it
<clever> Sonarpulse: if LD is already in the env, "LD=foo" sets an exported variable without needing the export statement
<clever> i recently discovered that the encode_json in perl isnt deterministic, which left hydra rather unhappy

2017-08-03

<clever> ToxicFrog: nixpkgs.overlays in configuration.nix
<clever> ToxicFrog: nixos-rebuild wont load overlays from the path
<clever> the -v makes things more obvious when it works
<clever> i always do ln -sv
<clever> ToxicFrog: then search it for both versions of bitlbee
<clever> ToxicFrog: find the path for the final .drv file in the tree, then run nix-store -qR on that drv
<clever> ToxicFrog: what did you modify inside the overrideAttrs ?
<clever> yeah
<clever> and dont reference pkgs anywhere
<clever> it must use super
<clever> foo = self.foo.override will fail
<clever> ToxicFrog: ah, make sure an override doesnt refer to self when trying to modify itself
<clever> ToxicFrog: if you gist what you changed recently i could take a peek
<clever> ToxicFrog: one of those files is manipulating a function that came from your code, the traces suck
<clever> yeah, that
<clever> attempt to call something which is not a function but a set, at
<clever> joepie91: overrideAttrs needs a function
<clever> ah, but it should still be a derivation returned
<clever> but if pluginSupport is false (like in oraclejdk8), it skips that entirely
<clever> joepie91: appendToName is a function that takes a derivation, and applies an override to its .name field
<clever> joepie91: oraclejdk8 is an attr that has already done so
<clever> joepie91: if you pass it the required 2 booleans, it should return a derivation that can be overridden
<clever> the strbuf_getwholeline in frame 27 is reading up to the first \n in a given FILE*
<clever> Sonarpulse: try loading the release.nix in nix-repl and eval the job's attribute?
<clever> that implies it was hung at __read_nocancel for over 3 weeks, and the deadlocking was a side-effect of __read_nocancel not handling signals right
<clever> hmmm, reading the .bash_history, i sent it 3 signals while debugging, and i see 3 signal handlers in the backtrace
<clever> though given that opendir returns a DIR*, you can probably expect it to do so
<clever> so its not safe to do opendir in a signal handler!
<clever> the man page makes no mention of that
<clever> opendir calls malloc
<clever> git is using opendir to implement its rm -rf
<clever> aha, i think i found an un-documented hole in glibc
<clever> over 3 weeks
<clever> this git process has been deadlocked since july 11th
<clever> x
<clever> gchristensen: malloc hangs on a mutex, and sending any signal, causes another nested malloc, to hang on the same mute
<clever> gchristensen: check the backtrace i linked ~10mins ago
<clever> yes
<clever> and that involves malloc in the signal context
<clever> at a glance, i think it will just undo the partial "git clone" upon receiving any signal (maybe even sigchld?)
<clever> ah, git/git on github for git
<clever> how do i google the git repo, for git!
<clever> ive also run into a more difficult problem
<clever> lol
<clever> Infinisil: RIIR?
<clever> and the zombie apocalypse is already starting, i found 2 such instances on the server
<clever> it has been waiting for a rotting child to die since july 11th
<clever> i think the sigchild was ignored, and it never ran waitpid()
<clever> the reason i noticed, is because it was ignoring a dead child
<clever> LnL: and now ive found a bug in either git or glibc, causing deadlocks that ignore all signals: https://gist.github.com/cleverca22/b8c04ac38a05660539a9b2157a9fa0d7
<clever> you can also run nix-shell on an ubuntu system that has had nix installed
<clever> yeah
<clever> and now you can track the dependencies in git
<clever> nschoe: if you put this into a file called shell.nix, you can just run nix-shell without an arguments
<clever> with import <nixpkgs> {}; stdenv.mkDerivation { name = "yourproject"; buildInputs = [ gnome.gtk pkgconfig ]; }
<clever> you can also create a shell.nix to save the list of packages that will be growing
<clever> yes
<clever> so when using nix-shell, it will just work
<clever> nschoe: gcc should also be in the scope already, and it will change the search path for -I
<clever> nschoe: by adding pkgconfig to the -p list, a setup hook for pkgconfig gets ran, which will scan over all of your inputs (gnome.gtk pkgconfig), and add each of them to an env variable that changes the pkgconfig search path
<clever> nschoe: nix will never have a /usr/lib/include directory
<clever> nschoe: you must still build it under nix-shell, and installing pkgconfig also breaks it
<clever> nschoe: nix-shell -p gnome.gtk pkgconfig
<clever> eacameron: i generally use ghcWithPackages, just add all the packages you need to it
<clever> nschoe: you must use nix-shell when building things, installing build-time stuff just breaks it
<clever> akiroz: so it gave an invalid value to nixos, as the key to allow in
<clever> akiroz: that probably stopped it from creating an ssh keypair
<clever> which was linked on https://nixos.org/wiki/PulseAudio
<clever> too much spam
<clever> swoorup: the wiki was shut down, https://nixos.org/nixos/options.html#hardware.pulseaudio.enable
<clever> akiroz: i'm guessing there is a bug dealing with that public key
<clever> client_public_key = nixops.util.attr_property("libvirtd.clientPublicKey", None)
<clever> akiroz: which backend are you using?
<clever> akiroz: did you set users.users.root.openssh.authorizedKeys.keys to something?
<clever> copumpkin: swoorup just ran into that issue
<clever> boot.loader.generic-extlinux-compatible.enable = true; boot.loader.grub.enable = false;
<clever> boot.loader.grub.enable = false;
<clever> that also copies kernels to /boot, if it needs to
<clever> copumpkin: i believe that only generates a config file, it doesnt install a bootloader
<clever> but if you run the command i gave?
<clever> swoorup: nix-env -iA nixos.viber
<clever> postUnpack = "cp -vir ${./headerfiles} headerfiles";
<clever> nix can do that
<clever> which contains your header
<clever> it will expand to a storepath containing a complete copy of the foo directory
<clever> you must pass make the ${./foo} path, not the /home/user/foo path
<clever> you must either pass that special path directly to make, or copy it to the current directory, and have make look in the current directory
<clever> you will see that nix generated a special path
<clever> change the ls to an echo
<clever> 2017-08-03 13:27:11 < clever> zennist: and ./include is a path relative to the nix file, that nix should include
<clever> 2017-08-03 13:27:01 < clever> zennist: the ${ ... } lets you insert a nix expression into a string
<clever> you must refer to that custom location inside the ${ ... }
<clever> that doesnt look like you used ${
<clever> zennist: and then look at the output it generates in the build
<clever> zennist: to start with, try adding this: postUnpack = "ls -ltrh ${./headerfiles}";
<clever> zennist: and where are you trying to access the headers?
<clever> zennist: can you gist the full nix file?
<clever> packageOverrides and overlays can do that
<clever> yeah
<clever> ah
<clever> joepie91: make an override with src = ./foo.tar.gz;
<clever> its using fetchurl, so it downloads, and it removed requireFile, so the order doesnt matter anymore
<clever> joepie91: a packageOverride on the oraclejdk, replacing requireFile with fetchurl would solve that problem twice
<clever> zennist: so the headers should be in the same directory as the nix file, and then ${./headerfiles}
<clever> zennist: and its recomended to always use relative paths, not absolute
<clever> zennist: and ./include is a path relative to the nix file, that nix should include
<clever> zennist: the ${ ... } lets you insert a nix expression into a string
<clever> zennist: try using ${./include} in the nix expression instead
<clever> zennist: what is in that directory that your trying to access?
<clever> zennist: its also ran as another user, nixbld1
<clever> zennist: all files you need to build must be clearly specified in the .nix file
<clever> zennist: HOME is set to /homeless-shelter during a build
<clever> hydra cant build the oracle jdk, so hydra wont have anything cached that depends on it
<clever> and then that
<clever> joepie91: only thing i can think of involving JRE, is to just re-host the tar on your own site, and fetchurl them
<clever> so things root installs with nix-env are visible to every user
<clever> jonjitsu: under nixos, the bin dir for the default profile is just in $PATH by default for every user
<clever> Infinisil: lib.mapAttrs maybe
<clever> [root@amd-nixos:~]# nix-repl '<nixos/nixos>'
<clever> Infinisil: compare the .value and .default of everything in this tree, while somehow iterating over it
<clever> { _type = "option"; declarations = [ ... ]; default = false; definitions = [ ... ]; description = "Whether to enable enable toxvpn running on startup."; example = true; files = [ ... ]; isDefined = true; loc = [ ... ]; options = [ ... ]; type = { ... }; value = true; }
<clever> nix-repl> options.services.toxvpn.enable

2017-08-02

<clever> Infinisil: the github i linked earlier works without a hardware-configuration
<clever> Infinisil: nope, i either delete it or leave it under the control of nixos-generate-config
<clever> joepie91: 1gig of ram in the netbook
<clever> Infinisil: i still have that 40mb drive, that is twice as thick as a normal desktop drives
<clever> taktoa: at a glance, i think its just a grep for (Chained|PathPart|Path)
<clever> ah
<clever> ah, its under src/lib/hydra.pm
<clever> taktoa: i'm having trouble finding the source for that
<clever> i had to disable xorg and fully GC, before i could even do the last nixos-rebuild
<clever> it almost has more then the netbook
<clever> my gpu has 2gig, lol
<clever> my main desktop has 16gig of ram
<clever> yeah
<clever> so i can fit ~7 generations on the drive, if i delete everything else
<clever> the closure for the current nixos, is 499mb
<clever> 4gig total, 3.5gig for /
<clever> the netbook i added is also a fairly small SSD
<clever> then its just rng
<clever> yeah
<clever> given enough time, you can probably crack it
<clever> so its still moderately safe
<clever> the only one in the new passwords.nix is a pam hash
<clever> Infinisil: have a look at the files in the github i just linked
<clever> but rather then audit the entire git history before i publish, i'm just publishing the safe files one-by-one
<clever> i now keep them all in passwords.nix, which is imported as needed
<clever> i might have had passwords in the old git repo, so ive begun manualy copying things to a new one, and publishing that
<clever> joepie91, Infinisil https://github.com/cleverca22/nixos-configs
<clever> yeah
<clever> so every binary in nixos has its own rpath, saying where it should find libs
<clever> but LD_LIBRARY_PATH has a higher priority then rpath
<clever> kiloreux: rpath is a field inside the ELF file, that does the same basic job
<clever> it depends heavily on which packages your actually using from nix
<clever> kiloreux: i think pam may use it some
<clever> finding those bugs may be "fun"
<clever> kiloreux: so the only problem will be when packages in nix rely on LD_LIBRARY_PATH rather then rpath
<clever> then you can just rename the variable to whatever you want
<clever> kiloreux: you would need to put a packageOverride (or just edit glibc in nixpkgs) to supply a .patch file to modify that
<clever> kiloreux: patching ld.so seems like one of the simplest, though it might break some nix packages
<clever> or rebuild everything, and patch the nix ld.so, to ignore LD_LIBRARY_PATH
<clever> or wrap everything not-nix with a shell script that sets LD_LIBRARY_PATH
<clever> or wrap every nix program with something that clears LD_LIBRARY_PATH
<clever> and is not in LD_LIBRARY_PATH
<clever> commit to nix and make sure everything uses rpath correctly
<clever> :O
<clever> and he didnt tell me what command he ran, only that it was complaining about xyz being broken
<clever> and nix tried to install nixpkgs, all of it
<clever> somebody i was helping in here tried to do nix-env -i
<clever> i do remember seeing nix-env do this before
<clever> yeah, that sounds better
<clever> oh yeah, it can install things in a set
<clever> use config.nix to create a buildEnv called mystuff, nix-env -irA nixos.mystuff
<clever> lol
<clever> Infinisil: and what about everybody else they invited?
<clever> Infinisil: how far up the chain? lol
<clever> yes
<clever> Infinisil: it has to be a mount point, because i'm running a fuse program in the nix build, and testing that it does the right thing
<clever> but nix-daemon doesnt know how to clean it up, and the "rm -rf" breaks at mount points, cant delete the dir
<clever> and it just works
<clever> Infinisil: with sandboxes off, you can access the setuid wrapper in /run
<clever> gchristensen: i have also used fusermount to mount a fuse fs from inside a build!!
<clever> gchristensen: with sandboxing off and manually setting NIX_REMOTE, i have used nix from inside other nix builds before
<clever> Infinisil: i have been accused of using vim like notepad, lol
<clever> i have no idea how to split things on purpose, lol
<clever> i use :tabe, tabp and tabn to get tabs
<clever> same, lol
<clever> i have over 20 shells open in at least 2 screen sessions
<clever> screen and more shells
<clever> i try to just not close vim until i dont need the undo
<clever> i let zfs handle that
<clever> same
<clever> yep
<clever> and oh god, there everywhere! :P
<clever> i have list on so i can see stray tabs in things
<clever> and now its hard to relearn all the keybinds
<clever> main reason i'm on vim is because thats the first editor ##linux said to use when i asked how to edit something back in 2005
<clever> that works in a similar way
<clever> probably
<clever> thats on by default
<clever> thats on by default
<clever> LnL: the only thing missing is a one-time command to install wakatime via vundle, and patching a /usr/bin/python in ~/.vim
<clever> i use that vim 90% of the time
<clever> yeah
<clever> i dont think thats valid syntax
<clever> so its obvious from the args, what your using
<clever> this is why i was in favor of using pythonPackages.callPackage, and not passing pythonPackages around
<clever> which licenses does it use?
<clever> you passed all of pythonPackages to a package, that only wanted 3 attributes
<clever> Infinisil: and now we have the pythonPackages.callPackage thing i mentioned yesterday
<clever> but you can at least code it to print unknown things
<clever> copumpkin: yeah, then you need to fix the iteration loop after you track it down
<clever> copumpkin: it might be simpler to just run nix-store -qR $(nix-instantiate ...), and then iterate over nixpkgs to map each .drv to an attribute
<clever> you have absolutely no way to access strace's meta
<clever> copumpkin: but if i do ${strace}/bin/strace in a string
<clever> yeah, it will miss a lot
<clever> %
<clever> lol
<clever> look at that aterm-2.0.nix file!
<clever> Infinisil: there it is, the very first commit in nixpkgs: https://github.com/NixOS/nixpkgs/tree/2766a4b44ee6eafae03a042801270c7f6b8ed32a
<clever> which creates the build of the channel profile
<clever> Infinisil: and then line 140 will merge that mess together, and call <nix/unpack-channel.nix>
<clever> Infinisil: for each channel nix-channel is managing, it will just concat another nix expression onto this string
<clever> while that computes, i'll link other stuff
<clever> one sec
<clever> gotta love legacy :P
<clever> thats likely related