2017-07-29

<clever> Infinisil: proxy changes have no effect on already open connections
<clever> its just cache.nixos.org being slow as is usual
<clever> that doesnt sound related to nix-daemon or the proxy
<clever> nixos-rebuild
<clever> can you gist that output?
<clever> then it will use the env of nixos-rebuild
<clever> nixos-rebuild as root should be able to spawn workers on its own without the daemon
<clever> stop the nix-daemon service as well, "systemctl stop nix-daemon"
<clever> ah
<clever> Infinisil: at a glance, all it does is set a few env variables, so run "env | grep proxyhostname" and unset them, then nixos-rebuild switch should temporarily work
<clever> all i can think of then is to patch patchelf
<clever> usually better to set it at link time
<clever> it would also mess with addresses embeded into the binary, you would have to apply relocations and such
<clever> bennofs: there is a field in the ELF header that says what address to load it at
<clever> been a few months since i delt with that, so i cant remember
<clever> yeah
<clever> a few hours i think
<clever> slabity: i have used wine.override { wineBuild = "wineWow"; }; before
<clever> slabity: one sec
<clever> not for that issue, but the github is at https://github.com/input-output-hk/stack2nix
<clever> et4te: i have passed the message on to one of the guys behind stack2nix
<clever> Infinisil: 404, after a pretty long delay
<clever> et4te: "${gcc.cc.lib}/lib/libgcc_s.so"
<clever> lol
<clever> catern: nixpkgs also has cross-compiler support, so you can skip cross-tools
<clever> catern: :D
<clever> catern: pitch nix at them!
<clever> et4te: this cabal flag tells it to always pass -lgcc_s to ghc
<clever> configureFlags = "--ghc-option=-lgcc_s"
<clever> but gcc.cc.lib contains the libgcc_s.so
<clever> the gcc attribute in nixpkgs is a wrapper around gcc
<clever> gchristensen: i only ever do (import <nixpkgs>{}).lib, so its probably low
<clever> but using inherit like in your version makes it much clearer
<clever> i just had to grep
<clever> gchristensen: ah, i always had trouble finding out which file a given lib function came from, the // make it unclear
<clever> et4te: yeah, i'm not sure what to do next
<clever> fnordxyz: boot the nixos install cd, mount everything to /mnt like in the middle of the install, and "nixos-install --chroot" and "nixos-rebuild boot"
<clever> the fix is seemingly just gone, yet its affects are still in hackage-packages.nix
<clever> though the file being patched no longer exists in the repo
<clever> i think it goes on the bits-extras derivation
<clever> the commit i linked also shows it modifying the configure flags some
<clever> configureFlags = "--ghc-option=-lgcc_s"
<clever> et4te: in hackage-packages.nix, it was just set to null
<clever> 33994 }) {gcc_s = null;};
<clever> aaronlevin: try adding /usr/lib to $LD_LIBRARY_PATH
<clever> aaronlevin: yeah, opengl has trouble when using nix on other distros
<clever> aaronlevin: is this on nixos or another distro?
<clever> et4te: can you gist the file stack2nix generated?
<clever> et4te: cant see anything on this end as to why its failing, the hackage-packages version of data.bits looks normal
<clever> can you gist the entire error?
<clever> what are you trying to build?
<clever> ah, its now in gcc.cc.lib
<clever> hmmm, not seeing it in a recent one, *looks more*
<clever> so add gcc.cc to your inputs
<clever> et4te: gcc_s is inside gcc.cc
<clever> can you gist the nix expression and the full error?
<clever> ah
<clever> et4te: what error is stack2nix giving?
<clever> M-liberdiko: what is the contents of your configuration.nix file and what changes have you done to that nixpkgs?
<clever> M-liberdiko: you can use -I nixpkgs= to insert things into the search path as well
<clever> and i have found images inside images inside images before, lol
<clever> and save the image on the nas
<clever> i usualy image a drive with dd before wiping it
<clever> :D
<clever> pretty sure nixos has an option for it
<clever> you can change the background image
<clever> lol
<clever> nice
<clever> but there is no luks involved, so zfs just scans everything for a pool called "naspool", and finds all of the pieces, then assembles it
<clever> Infinisil: the part labels collide, so the symlink can only point to one
<clever> /dev/sdc1: LABEL="naspool" UUID="7200155095284679922" UUID_SUB="6735154720865869234" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="0d2fcda2-8863-2c43-bd4e-0c83a1bebfad"
<clever> /dev/sdb1: LABEL="naspool" UUID="7200155095284679922" UUID_SUB="17637093852783491482" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="868e6929-235b-d442-88d0-65d5256a9a67"
<clever> /dev/sda1: LABEL="naspool" UUID="7200155095284679922" UUID_SUB="9359165330978170301" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="0419e4bb-1fb5-2446-ad2b-d889c89bbc3b"
<clever> though in my case, i gave every part of the pool the name zfs, so that route is bork for me
<clever> lrwxrwxrwx 1 root root 10 Jul 28 23:04 zfs -> ../../sda1
<clever> total 0
<clever> [root@nas:~]# ls -l /dev/disk/by-partlabel/
<clever> that one is based on the serial#, model, and partition index
<clever> ah
<clever> yeah, but the randomly generated uuid is harder to deal with
<clever> poke around in /dev to find a symlink matching the partlabel
<clever> partlabel can be made fixed, while letting the uuid randomize
<clever> youll need to manually add it with the right uuid, or partlabel
<clever> so it silently skipped it
<clever> its not aware of the device being in use
<clever> yeah
<clever> *looks*
<clever> Infinisil: nixos-generate-config will create the luks entry for you
<clever> oborot: how many wifi interfaces do you have?
<clever> Infinisil: yeah, they conflict
<clever> to make it use a certain disk always
<clever> i think thats for when you modify the efi settings
<clever> the disk doesnt come into play
<clever> because its reading config from the flash in the motherboard
<clever> but that option uses a special name that is in the default search path, normally reserved for install media
<clever> normally, you have to configure the efi to boot from a given binary in the efi system partition
<clever> you may also want to enable the removable option, one sec
<clever> the firmware may not like booting efi from an external drive
<clever> ah
<clever> why are there 2 nixos's present on the same macbook?
<clever> are you running on the macbook when you run nixos-install?
<clever> how are you doing the install exactly?
<clever> yeah
<clever> it should be pointing to the grub binary on an efi system partition
<clever> Infinisil: that util lets you query the firmware config, to see what the EFI is set to boot from
<clever> do you have a /etc/wpa_supplicant.conf file?
<clever> so it should work
<clever> it sucessfully read the firmware
<clever> [ 448.751115] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
<clever> any firmware related errors near the end?
<clever> oborot: what does dmesg say?
<clever> oborot: what error did it give?
<clever> what happens when you run efibootmgr from the livecd?
<clever> and then replug the usb adapter
<clever> oborot: try setting hardware.enableAllFirmware = true; in configuration.nix and then do nixos-rebuild switch
<clever> very differnt from mine then, but we can still try the common things
<clever> and if you unplug it and run lsusb again, that row disapears?
<clever> oborot: what does yours say in lsusb?
<clever> Bus 007 Device 033: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
<clever> oborot: what is the brand?
<clever> Infinisil: if a size is missing, it fills everything it can
<clever> Infinisil: it can also export the current table as text, so you can make it in gparted, then export it to text, and tweak that template
<clever> what does efibootmgr say when ran from the livecd?
<clever> Infinisil: hmmm, did you say this was on a mac?
<clever> with gpt, you have a uuid at the partition and fs level
<clever> the plain uuid is randomly generated
<clever> i seems to give the most details
<clever> use the i command in fdisk to compare it to something known-good, or gist the state
<clever> Infinisil: and in expert mode (x command to unlock it), you can change it with n
<clever> n change partition name
<clever> Infinisil: its visible in fdisk like this
<clever> Name: zfs
<clever> Command (m for help): i
<clever> [root@nas:~]# fdisk /dev/sda
<clever> but the name isnt important
<clever> in gparted, you can just set it in the gui
<clever> so you can label things where the FS doesnt support labels
<clever> gpt has partition table level uuid/type/label for every partition
<clever> the partlabel is just a string you can freely set on any partition
<clever> but that can be set in the partition editor
<clever> i dont think the bios cares about the partlabel
<clever> kk
<clever> without running cryptsetup open, what does blkid /dev/sd* show? from a livecd
<clever> Infinisil: yeah
<clever> dang!

2017-07-28

<clever> i just go for a simple ext4 for /boot
<clever> grub*
<clever> Infinisil: ive also heard that zfs doesnt correctly handle journal playback of any filesystem
<clever> stage 1.5 has to ask for a password to even find /boot, then linux has to ask for a password to open /
<clever> Infinisil: and also, encrypting /boot means you have to enter 2 passwords to even boot the machine, and a 3rd to login
<clever> Infinisil: while it does have luks, lvm, and zfs support, i'm not sure if grub is capable of using all 3 at once from stage 1.5
<clever> Infinisil: heh, i think thats asking a bit too much of grub
<clever> tuareg
<clever> schoppenhauer: what if you run strace over emacs as you try to load it?
<clever> but if /boot is its own dataset, nix will copy things over, and it might work
<clever> so grub cant navigate the mess that is /nix/store/
<clever> ive heard that grub has trouble if there are too many directories in the path of files on zfs
<clever> schoppenhauer: then that emacs should be working
<clever> avn: and because of how nixos works, all of the /boot variants must update together, or bad things happen
<clever> avn: boot.loader.grub.devices takes an array of drives to put stage 1.5 into, but that still relies on the /boot partition surviving
<clever> what about in this directory?
<clever> ls /nix/store/mk20xpab15j3if0srq4xn3r296gz2k4b-emacs-packages-deps/share/emacs/site-lisp
<clever> yeah
<clever> that should just be a bash script, what is inside it?
<clever> type is part of bash, so its more likely to work
<clever> Infinisil: there is also "type emacs"
<clever> and the weakest link in the chain will always be your choice of zfs redundancy
<clever> so a loss of /boot due to other disks dying will never happen
<clever> so grub can survive even with a loss of all but 1
<clever> i think that one uses a mirror
<clever> this guide even includes using an mdadm raid for /boot
<clever> so its best to match them all in size
<clever> the raidz1 stuff in zfs can only use the size of the smallest disk in the array
<clever> the laptop is the only one without reduncancy, but i could always zfs send it to the NAS
<clever> maybe 3
<clever> and my NAS is a raidz1 over 4 drives i think
<clever> my desktop is on an SSD mirror
<clever> the system still "worked", but apt was hosed beyond repair
<clever> Infinisil: lost the main 500gig volume, and the /var/db/dpkg directory
<clever> Infinisil: one day, one of the hdd's in the array failed, and i had no redundancy setup
<clever> c74d: ah, so it will probably break
<clever> Infinisil: and because i was constantly resizing things, the LV inside it was in over 200 fragments
<clever> Infinisil: many years ago, i used LVM to join 4 pata drives up into a "giant" 500gig array, with ext3 on top
<clever> c74d: good question, i havent gotten it to work yet on that machine
<clever> Infinisil: then make a zfs pool on /dev/${vgname}/root and swap on /dev/${vgname}/swap
<clever> Infinisil: then you can run pvcreate and vgcreate on that, followed by 2 lvcreate's, which makes a /dev/${vgname}/{swap,root} pair of nodes
<clever> Infinisil: when you run cryptsetup open, you give it a name for the device, and it will appear at /dev/mapper/${name}
<clever> or just no swap
<clever> you could potentialy do randomly encrypted swap, or swap on a 2nd luks
<clever> only if you want swap on the same luks device
<clever> just luksFormat a device, open it, then create lvm nodes and zfs as normal
<clever> but it was fairly simple, and i just helped somebody thru it lastnight
<clever> not for luks + lvm + zfs
<clever> so i opted to encrypt my zfs and swap with a single luks device, so one passphrase unlocks everything
<clever> but i think that breaks hibernation
<clever> so at shutdown, its imposible to recover the swap
<clever> there is an option to use a random encryption key on the swap, and to not save the key
<clever> then persist, in plaintext, for ages
<clever> in theory, passwords you type go into ram, and potentialy go into swap
<clever> but if your not using luks, zfs and swap just get normal partitions directly on the drive
<clever> then zfs eats one, and swap eats the other
<clever> on my laptop, i use LVM to split 1 luks volume into 2 block devices
<clever> and it can allow fragmenting, striping, or jbod
<clever> lvm just maps ranges of blocks to ranges of blocks, with a static mapping
<clever> lvm is much simpler
<clever> and allocating memory during swap is bad
<clever> zfs needs to allocate a lot of memory
<clever> swap on a zvol has reportedly had major problems for years
<clever> otherwise, i can just use partitions
<clever> and thats only when i want to mix zfs and swap on the same luks device
<clever> but if i want swap on the same block device as zfs, i use lvm
<clever> mostly, it does the same thing as zfs and zvol's, so i dont use it much
<clever> line 37 solved that
<clever> pre-existing LV's had been activated by nixos, and refused to unlock the disk
<clever> i also ran into an lvm issue once on ubuntu
<clever> Infinisil: that might be of use in my kexec stuff, i'm currently just dd'ing over the first 10k blocks: https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix#L39
<clever> nh2: so it would skip most of it
<clever> nh2: i think i saw an issue on nixpkgs about overriding the autoconf cache via stdenv
<clever> then check pavucontrol
<clever> hodapp: try turning pulseaudio on in configuration.nix
<clever> and it is listing pulseaudio names for devices
<clever> hodapp: under settings->audio, i see 3 mic input options
<clever> so it breaks under a nix-shell
<clever> dang, obs now relies on propagated userenv packages
<clever> checking this end...
<clever> then in the main window, you can control the mix of all of them
<clever> so you could add 3 or 4 different audio captures
<clever> in the OBS settings, you can configure secondary capture sources
<clever> check the levels in pavucontrol
<clever> then cross-xserver capture can get your screen recorded
<clever> the above gist removes all opengl from it
<clever> so partial opengl support breaks it
<clever> the funny thing, is that OBS works "better" with zero opengl support
<clever> that might allow the webgl to keep working on the host x server
<clever> and i think it needs more cpu, its basicaly doing 30 screenshots per sec
<clever> one of the advanced options, set it to capture from :0
<clever> hodapp: you can do cross-xserver capture in obs, but its monitor level, not window level
<clever> hodapp: yeah, this creates a new x server with zero gl support, and runs obs inside that
<clever> something critical is wrong in the opengl, but it runs fine under things like xephyr and xnest
<clever> i'm on ati
<clever> ah
<clever> hodapp: ive got the same problem on my end, what GPU do you have?
<clever> LnL: line 22 has autoindent on
<clever> so you can pause, and copy out of my terminal at any point
<clever> and also, asciinema isnt video, thats just raw text, with timestamps on every character
<clever> Infinisil: something in there is doing it, the .vimrc is empty
<clever> Infinisil: not sure, but i have the config in a gist
<clever> hodapp: an example of the other: https://asciinema.org/a/2Iq7VXX8kJaX1YYaAOjr7fESI
<clever> hodapp: OBS can do audio
<clever> hodapp: obs-studio can do full compositing of many windows, webcams, other media sources, and scene transition stuff, and then either record or stream
<clever> hodapp: obs-studio for full gfx, asciinema for text-mode recording
<clever> Infinisil: there is a yaml2json program in the haskellPackages.yaml derivation
<clever> FRidh: ah, maybe postgress is broken then
<clever> FRidh: what about deleting this file, and restarting the hydra-init service: https://github.com/NixOS/hydra/blob/master/hydra-module.nix#L269
<clever> FRidh: maybe the initial db import
<clever> FRidh: ah, sounds like some of the hydra init stuff failed
<clever> FRidh: what happens if you run these 2?
<clever> FRidh: sudo -u hydra -i -> hydra-create-user admin --password hunter2 --role admin
<clever> FRidh: i dont think its the postgress user, let me check my logs
<clever> FRidh: try a role of 'admin' instead
<clever> magnicida: it took 12 seconds for my not-os to boot under qemu
<clever> not-os boots pretty fast, a lot of useless junk has been removed
<clever> but treating the entire thing more as firmware then software
<clever> magnicida: i had originally designed it to run on a rack of ~8 servers, network booting from eachother
<clever> magnicida: another benefit of not-os, is that your entire system is ~3 files in /boot, so its very easy to version the entire machine and up/downgrade
<clever> joepie91: my kexec trick doesnt even boot on a 512mb system, and i dont think it can get far enough to make its own swap
<clever> and jouralctl compat
<clever> Binary file /nix/store/aw58bcj28add9scpqizsfcjjzzd5l8z3-util-linux-2.29.2-bin/bin/logger matches
<clever> not-os lacks udev entirely!
<clever> i think its the udev libraries mostly
<clever> Binary file /nix/store/aw58bcj28add9scpqizsfcjjzzd5l8z3-util-linux-2.29.2-bin/bin/lsblk matches
<clever> ah, it was utillinux, not coreutils
<clever> LnL: double-checking
<clever> Infinisil: yep
<clever> every other part is a stock build from the nix binary cache
<clever> the only thing i'm compiling specially is coreutils (to remove systemd)
<clever> i'm also using a full glibc, so it could be made even smaller
<clever> depends a lot on what else you want it to run, thats just a bare sshd and runit
<clever> LnL: yeah, 40ms for the squashfs, plus some initrd and kernel space
<clever> magnicida: i made a fork of nixos, that can compile down to a ~40mb squashfs and runs entirely from ram: https://github.com/cleverca22/not-os

2017-07-27

<clever> Infinisil: ehh, this build is taking too long, i'll just finish it tomorrow
<clever> yeah, i have trouble signing off :P
<clever> Infinisil: that is the internals behind how pkgs.hello.meta.position works
<clever> { column = 3; file = "/nix/store/5n59fpmkjna4gfcnjh5b0kpgn4vnpvkq-nixpkgs-17.03pre96825.497e6d2/nixpkgs/pkgs/top-level/all-packages.nix"; line = 32; }
<clever> clever@c2d ~ $ nix-instantiate --eval -E 'with import <nixpkgs>{}; builtins.unsafeGetAttrPos "callPackage" pkgs'
<clever> et4te: nix-copy-closure
<clever> heading off to bed now