2017-10-22

<clever> iqubic: maybe 4.12
<clever> iqubic: 4.9 i believe
<clever> Yaniel: that one didnt work, and neither does libinput
<clever> seequ: this is where most of the closed-source nvidia driver names are defined
<clever> seequ: which one do you want to use?
<clever> yeah
<clever> sphalerite: thats a bug that got introduced a few months ago by some refactorings
<clever> iqubic: not sure what else to check
<clever> iqubic: what was the model of laptop again?
<clever> iqubic: there is a lot of xorg output missing, is there an xorg log within /var/log/ ?
<clever> kuznero: nix-repl '<nixpkgs>' then "${stdenv.cc.cc.lib}"
<clever> kuznero: you can eval that part in nix-repl
<clever> kuznero: you want to write a nix expression that will patch it for you
<clever> kuznero: $NIX_CC will have that path, as long as gcc is in the inputs (nix-shell -p gcc)
<clever> iqubic: anything interesting in the journal? journalctl -u display-manager, scroll near the bottom
<clever> kuznero: where the binary will search for its libraries
<clever> kuznero: you need to set both the interpreter and rpath
<clever> iqubic: xorg will have to be restarted, systemctl restart display-manager
<clever> iqubic: it will ignore it if its disabled
<clever> iqubic: set synaptics.enable = false;
<clever> kuznero: patchelf, it should be in the nixpkgs manual
<clever> sphalerite: and make sure you unset, rather then setting it to an empty string
<clever> sphalerite: double-check the value of $NIX_REMOTE in both shells
<clever> iqubic: so you can fix it on either OS
<clever> iqubic: https://nixos.org/nixos/options.html#hardwareclockin is the reverse option
<clever> iqubic: so every time you change OS, the clock is off by a few hours
<clever> iqubic: linux sets the hardware clock to UTC
<clever> iqubic: yeah, thats the issue, windows sets the hardware clock to local
<clever> iqubic: oh, is this going to be a dual-boot?
<clever> iqubic: time, or timezone?, does "date" show the right zone?
<clever> sphalerite: can you gist the output of the strace?
<clever> sphalerite: oh, and also, try deleting /nix/var/nix/binary-cache-v3.sqlite* then try again
<clever> sphalerite: we are looking for an IP starting with 128
<clever> sphalerite: try again with "strace -e trace=connect,execve -s 300 -f" at the start
<clever> ghostyyy: add boot.debug1 to the kernel params and it will force a shell
<clever> sphalerite: can you gist the full output?
<clever> hodapp: it will move everything in / to /old-root, except /nix
<clever> Dezgeg: ah, yeah, that will force it to only go thru the cache, it will fail to build
<clever> woffs: somebody in #nixos made lustrateRoot after hearing the story of how i manually did that when installing nixos onto a netbook without the install media
<clever> sphalerite: the redirects may also be upsetting nix, try using the destination instead: https://www.cs.helsinki.fi/u/tmtynkky/nixos-arm/channel
<clever> sphalerite: -vvvvv maybe
<clever> nschoe: can you throw that project and its .cabal file onto github?
<clever> if it has +w to the store and the var is unset, it will just directly spawn the worker
<clever> sphalerite: yeah
<clever> Dezgeg: and port 80 redirects elsewhere
<clever> sphalerite: also, that server isnt listening on 443
<clever> url: (7) Failed to connect to nixos-arm.dezgeg.me port 443: Connection refused
<clever> sphalerite: did you restart nix-daemon?
<clever> vaibhavsagar: sudo -u hydra -i
<clever> vaibhavsagar: you have to run those commands as the hydra user
<clever> nschoe: what about making a Setup.hs and using runhaskell on it, rather then using nix-shell again
<clever> vaibhavsagar: you may also need to: export HYDRA_DBI=dbi:Pg:dbname=hydra;user=hydra;
<clever> vaibhavsagar: hydra-create-user admin --password hunter2 --role admin
<clever> vaibhavsagar: you first need to create a user using a CLI program, ran as the hydra user
<clever> nschoe: and is librarySystemDepends set in that expression?
<clever> nschoe: just running it directly on the directory and then using nix-shell on the resulting expression
<clever> nschoe: have you tried using cabal2nix?
<clever> woffs: that nix-build command is basically the same as "nixos-rebuild build"
<clever> woffs: oh, and -A system is an alias to that full attrpath
<clever> woffs: ah, not really, i just read the source for nixos and nixos-rebuild
<clever> woffs: which part?
<clever> sphalerite: "touch /etc/NIXOS_LUSTRATE" will fix that
<clever> only problem, is that the garbage in /bin and /etc breaks nixos :P
<clever> sphalerite: then it will boot nixos, on the previous rootfs
<clever> sphalerite: the above will build nixos in /nix, on any distro, and then overwrite the bootloader config
<clever> sphalerite: basically, just: nix-build '<nixpkgs/nixos>' -I nixos-config=/etc/nixos/configuration.nix -A config.system.build.toplevel && touch /etc/NIXOS && ./result/bin/switch-to-configuration boot
<clever> sphalerite: i have also installed nixos, without nixos-install or nixos-rebuild
<clever> sphalerite: that was in the old linode guide, on the previous wiki
<clever> sphalerite: you can even install them with nix-env
<clever> CrazedProgrammer: yeah, that looks good, only other thing i can think of would be to squash it into a single commit
<clever> and if there is no initrd, and no init flags, it will try /sbin/init, /etc/init, /bin/init, and /bin/sh
<clever> and the stage-1 script in the initrd is what chooses to obey init=
<clever> sphalerite: when using an initrd, init= has basicaly zero impact, and it will only appear in /proc/cmdline, and rdinit= is what actually affects the kernel
<clever> sphalerite: thats the code responsible for starting pid 1
<clever> hmmm, root dev is missing now
<clever> /nix/store/38x3r16rhpiwcvnsp1gsm04zfnixllpx-linux-4.9.46/bzImage: Linux kernel x86 boot executable bzImage, version 4.9.46 (nixbld@localhost) #1-NixOS SMP Wed Aug 30 08:24:43 UTC 2017, RO-rootFS, swap_dev 0x3, Normal VGA
<clever> [root@amd-nixos:~]# file /nix/store/38x3r16rhpiwcvnsp1gsm04zfnixllpx-linux-4.9.46/bzImage
<clever> sphalerite: there is also a default root device in the kernel (file will tell you what it is)
<clever> sphalerite: you could even symlink /bin/init to /nix/var/nix/profiles/system/init and then the kernel default would work
<clever> sphalerite: init=/nix/var/nix/profiles/system/init will always point to the current generation, and now you dont have to make nixos manage a bootloader config
<clever> sphalerite: the tricky part is the init=, but you could cheat some
<clever> sphalerite: ah, that should work then, just pass the right root=/dev/sda1 to the kernel, in addition to the existing init= that the nixos bootloader generates
<clever> sphalerite: but the default kernel has too much as modules, and it cant mount any filesystem on its own
<clever> sphalerite: if you can manage to mount the rootfs without relying on kernel modules, you could boot it without an initrd
<clever> CrazedProgrammer: lib is also present at stdenv.lib, so the lib on line 1 is optional
<clever> CrazedProgrammer: one trick you could do, line 11, icon = desktopIcon; then it will use the file directly from the store and you dont have to copy it anywhere special
<clever> so you have to re-do the build without -Q and wait for it to re-fail
<clever> the only downside of -Q, is that it wont show the error output either
<clever> i think the /proc api is fairly limited
<clever> yeah, lol
<clever> sphalerite: ah, -1
<clever> You can remove one entry or all entries by echoing -1 to /proc/.../the_name or /proc/sys/fs/binfmt_misc/status.
<clever> sphalerite: i think you can write it to arm, instead of register, to overwrite an existing type
<clever> hmmm
<clever> sphalerite: there is a delete file under /proc/sys/fs/binfmt_misc/ somewhere, that you can write a 1 to
<clever> sphalerite: you can try the unwrapped qemu-arm instead, and remove the P flag at the end of the register string
<clever> sphalerite: oh, qemu-wrap has an absolute path in it, that was to fix a bug
<clever> that line contains the raw bytes to look for in the header of a file, and a mask of what bytes actually matter
<clever> sphalerite: yeah, that also works, just update the register script for binfmt-misc
<clever> GRBurst: you would need to use the qemu-user stuff, and it would greatly slow it down
<clever> if you imperatively copy the qemu binary into the store (mine is static), then nix will ignore it until you run a GC
<clever> yep
<clever> or just bind-mount all of /nix into the chroot
<clever> you have to copy the qemu binary into that new root
<clever> at the same path
<clever> oh right
<clever> sphalerite: once thats done, binfmt-misc will be configured, and you can just run any arm binary
<clever> sphalerite: nix-build -A qemu-user-arm && ./result/bin/register
<clever> sphalerite: sure
<clever> GRBurst: the build slave stuff needs the slaves to have the right cpu for target your building for
<clever> sphalerite: ive also got a hydra, its building the armv7 gcc right now
<clever> Neo--: this is something i have used before
<clever> Neo--: latex2pdf = name: input: runCommand name { buildInputs = [ (texlive.combine { inherit (pkgs.texlive) scheme-full lm tipa; }) pandoc ]; } ''
<clever> that should have the same effect
<clever> srhb: you could also just set the default to 25 and type int
<clever> CcxWrk: kk
<clever> aristid: yeah
<clever> knupfer: an thats missing for arm
<clever> knupfer: nixpkgs ghc needs a bootstrap that is already built for that platform
<clever> aristid: and shellcheck is haskell
<clever> aristid: there is something in the nix build process that runs shellcheck over a few things
<clever> aristid: shellcheck
<clever> aristid: nix depends on ghc now, thats blocking some of my arm builds
<clever> yeah
<clever> srhb: i have no idea why, but thats the way it is
<clever> srhb: and false is ""
<clever> CcxWrk: it hasnt even finished the stdenv
<clever> CcxWrk: yeah, xz is what had failed
<clever> CcxWrk: nix gives the entire dependency chain when it fails
<clever> CcxWrk: that error wasnt in hello
<clever> CcxWrk: can you gist more of that error?
<clever> mc_Der: the rev argument can also take a branch name
<clever> CcxWrk: what error did it show above that?
<clever> sphalerite: what happens if you run "reset" ?
<clever> desync ensues :P
<clever> vim said it was 3 columns wide
<clever> the tty said it was 0 columns wide
<clever> i also ran into a problem where i copy/pasted strings from the aws docs into vim, and i wound up with a 3 byte unprintable character
<clever> i have noticed some weird conflicts when i used screen under tmux
<clever> sounds like desync
<clever> 3759
<clever> [clever@amd-nixos:~]$ cat /nix/store/.links/1zzzranqs5bvyvb1i1ing6nbj0yni0wihgmfs276w9bifv1gaccw | wc -c
<clever> i think i have those backwards
<clever> sphalerite: i'm not even sure how ls knows its using 3.7k on-disk and 4.5k of actual data
<clever> 4.5K -r--r--r-- 2 root root 3.7K Dec 31 1969 /nix/store/.links/1zzzranqs5bvyvb1i1ing6nbj0yni0wihgmfs276w9bifv1gaccw
<clever> [clever@amd-nixos:~]$ ls -lhs /nix/store/.links/1zzzranqs5bvyvb1i1ing6nbj0yni0wihgmfs276w9bifv1gaccw
<clever> sphalerite: for example, compare the block count to the block size!
<clever> Size: 3759 Blocks: 9 IO Block: 4096 regular file
<clever> File: /nix/store/.links/1zzzranqs5bvyvb1i1ing6nbj0yni0wihgmfs276w9bifv1gaccw
<clever> Size: 97 Blocks: 1 IO Block: 512 symbolic link
<clever> File: /nix/store/.links/1zzzy73kdz5jdmgf4dy4yiij72j1fb8bpsvza25fsv3fdvxaq38s -> /nix/store/xp5b1nzlxxjsblkp66wr7xyqnxi9sw17-ncurses-6.0-man/share/man/man3/update_panels_sp.3x.gz
<clever> block size is horribly wrong on zfs
<clever> sphalerite: what filesystem are you on?
<clever> but there is several layers of hashing hashes
<clever> so storepaths can possibly have collisions
<clever> while .links uses the full sha256
<clever> Path linkPath = linksDir + "/" + hash.to_string(Base32, false);
<clever> Hash hash = hashPath(htSHA256, path).first;
<clever> 20 / 5
<clever> sphalerite: storepaths, use the first 20 bytes of a sha256
<clever> sphalerite: oh, i think i see the reason
<clever> ah, and it also runs thru compressHash
<clever> + compressHash(hashString(htSHA256, s), 20).to_string(Base32, false)
<clever> sphalerite: the algo for storepaths is pretty complex
<clever> Path linkPath = linksDir + "/" + hash.to_string(Base32, false);
<clever> yeah
<clever> sphalerite: mine go as high as 1zzzy73
<clever> and if the link count is >1, it will check the inode hashmap
<clever> optimisePath_ will recursively call itself on any directories
<clever> and just skips because the hardlink count is >1
<clever> i highly suspect it doesnt notice, and re-reads all directory metadata on every run
<clever> what does --optimize do when reading a storepath thats already been optimized?
<clever> another difference that could be improved
<clever> it would still have to scan the metadata of the dirs, but it can omit reading the data for the small files
<clever> sphalerite: i think having subdirs would also help a lot as well
<clever> sphalerite: that could reduce the number of links within .links/
<clever> fearlessKim[m]: i think so
<clever> srodal: yeah, that should also work
<clever> mount /dev/sda1 /mnt/boot/
<clever> mount NAME/nix /mnt/nix -t zfs
<clever> mount NAME/home /mnt/home -t zfs
<clever> mount NAME/root /mnt -t zfs
<clever> zpool import NAME -o altroot=/mnt/
<clever> import makes the pool available
<clever> oops, give a pool name, not a device name
<clever> and re-run all of the mount commands
<clever> iqubic: zpool import /dev/sda? -o altroot=/mnt/
<clever> above is an example of how to make your own entry
<clever> srodal: nix-env will only use things that contain a default.nix
<clever> srodal: by default, nix-env will only look in ~/.nix-defexpr
<clever> [clever@amd-nixos:~]$ cat .nix-defexpr/test/foo/default.nix
<clever> import /home/clever/apps/nixpkgs
<clever> it doesnt use a manifest file
<clever> srodal: you will probably want to remove the old nixpkgs within nix-channel at a minimum
<clever> which forces it to look in nixpkgs, within NIX_PATH
<clever> srodal: for nix-env, you can do: nix-env -f '<nixpkgs>' -iA firefox
<clever> srodal: nix-env basically ignores NIX_PATH
<clever> iqubic: mount -o remount,size=7G /nix/.rw-store
<clever> under total
<clever> iqubic: free -m
<clever> iqubic: how much ram does this machine have?
<clever> yeah, its the tmpfs for the live image
<clever> iqubic: can you pastebin the full df output?
<clever> iqubic: df -h, what is full?
<clever> iqubic: fails with what error?
<clever> jtojnar: i cant see an easy way to just turn on bz2 support
<clever> but i dont see the right configure function...
<clever> so its probably configured the same way as vim
<clever> jtojnar: oh, its using composableDerivation.composableDerivation
<clever> jtojnar: where did you add the flag, and where are you referencing php?
<clever> jtojnar: hydra only pre-builds one arrangement, so any changes you do get built locally
<clever> its just networking.hostId
<clever> remove the config. prefix on that line
<clever> iqubic: did you add something starting with config?
<clever> iqubic: yep
<clever> jtojnar: it reads the config you set in config.nix or nixpkgs.config
<clever> iqubic: the man page for configuration.nix tells you how you can generate a hostId, just search for hostId with /
<clever> iqubic: zfs uses the hostid to figure out what system last mounted a pool
<clever> yeah, i believe its ready for that
<clever> iqubic: if you install things properly, it wont
<clever> the man page says how
<clever> you have to set the cpio archive to the newc format
<clever> and must already be a full cpio archive, gziped
<clever> the file you refer to must be in a region that grub can read
<clever> nope
<clever> and if any files get in the way, it overwrites them
<clever> the kernel will just unpack each to a tmpfs, in order
<clever> ghostyyy: it looks like the path is added directly to the grub config
<clever> ghostyyy: that line of the config goes into an xml file
<clever> then copy configuration.nix over
<clever> iqubic: after mounting everything, including boot, you can run "nixos-generate-config --root /mnt" to generate the config
<clever> iqubic: you usually want some compression
<clever> iqubic: lz4 will compress all files you write to disk
<clever> dedup is off by default
<clever> iqubic: if you want lz4 compression: zfs set compression=lz4 POOLNAME
<clever> and also mount sda1 to /mnt/boot/ (and mkdir that first)
<clever> iqubic: nixos requires legacy mountpoints to boot
<clever> mount -t zfs rpool/nix /mnt/nix
<clever> mount -t zfs rpool/home /mnt/home
<clever> mkdir -pv /mnt/nix /mnt/home
<clever> mount -t zfs rpool/root /mnt/
<clever> then:
<clever> iqubic: use a command like this to make 3 filesystems, called home, nix, and root
<clever> zfs create -o mountpoint=legacy rpool/home
<clever> yeah, this is the only time its right to update stateVersion
<clever> iqubic: yeah, just copy it to /mnt/etc/nixos/ after you have mounted everything
<clever> iqubic: just give it time
<clever> ah, it got moved there, not removed
<clever> hyper_ch: licensing problems
<clever> yes
<clever> iqubic: add boot.supportedFilesystems = [ "zfs" ]; to /etc/nixos/configuration.nix and run "nixos-rebuild test"
<clever> you only need 1 zpool
<clever> after you have the pook, you want to create a few filesystems inside it, i usually make one for root, home, and nix
<clever> zfs create -o mountpoint=legacy rpool/home
<clever> but it should be unique when you make a second one
<clever> sometimes i just call it "laptop"
<clever> i name the pool after the hostname
<clever> iqubic: all of that goes inside one partition
<clever> if you already know you want 10gig, it may be simpler to make sda4 10gig, then make sda5 take the rest
<clever> which will format sda4 to be a zfs device
<clever> and run "zpool create -o ashift=12 -o altroot=/mnt NAME /dev/sda4"
<clever> then you will need to pick a name for the zfs pool
<clever> then make sda4 smaller
<clever> iqubic: to start with, use fdisk to create an sda4 that uses up the rest of the drive
<clever> iqubic: fairly easy
<clever> iqubic: some steps will have to be modified, and dont use sfdisk like this guide showed
<clever> i like zfs more then btrfs
<clever> and if your using zfs, mounting it to /mnt is a bit more complex
<clever> iqubic: you will need a new partition for nixos, which will probably be sda4, then mount sda4 to /mnt/ and sda1 to /mnt/boot/, and run nixos-generate-config
<clever> iqubic: do you want to keep windows?
<clever> ghostyyy: line 446 of stage-1 is where it mounts all filesystems
<clever> ghostyyy: the zfs always happens after the postlvm i believe
<clever> iqubic: it means the numpad will type numbers instead of arrow keys
<clever> ghostyyy: ah, i see that in the source
<clever> iqubic: you have to add copytoram to the kernel params when you boot, then you can unplug it
<clever> with the default options, no
<clever> iqubic: if you connect up a usb keyboard, what does its numlock do?
<clever> that would be the next thing to check
<clever> iqubic: have you checked google to see what others have siad about that model?
<clever> could be a hardware problem
<clever> about half of the disk is in use
<clever> looks like you simply have unpartitioned space