2017-11-18

<clever> yeah, the old 100mbit system only used half the wires
<clever> power over ethernet reused unused pairs to send power, while keeping the data on full time
<clever> and its basically unplugging the power really fast, to send data
<clever> proper 1-wire, will feed power over the data wire, when not doing comms, and it has to know how long to keep power on
<clever> hyper_ch: extremely different setup
<clever> but the 1 data wire has to span the entire house, and is being pushed up/down by a single GPIO pin
<clever> i didnt setup a mosfet to drive the line high when doing a sample
<clever> using proper 3 wire setup
<clever> and i'm stringing a single wire all over the entire house
<clever> hodapp: while the AVR can do up to 20mA at 5v
<clever> hodapp: i had some trouble getting them to work reliably on the rpi, because it only has 3.3v IO with rather low current capabilities
<clever> hodapp: ah, i see you also used the ds18b20's
<clever> hyper_ch: and then you have https://www.reddit.com/r/cablegore/
<clever> hyper_ch: ive heard of signs saying "plug this in to get wifi" being put on ethernet cables...
<clever> hyper_ch: https://imgur.com/op3ZzQP
<clever> it has 2 power switches!!!
<clever> hyper_ch: ah yeah, that one, lol
<clever> hyper_ch: so you can think of that chip as an entire computer
<clever> and you can turn the 23 pins on/off, or use them as inputs
<clever> hyper_ch: that chip contains a 20mhz cpu, 32kb of program memory, 2kb of ram, and 1kb of eeprom
<clever> the sensor can read down to 1/16th of a degree
<clever> gchristensen: any time it gets under 20.00, the heat turns on, and above 20.50 it turns off
<clever> gchristensen: the zoom is automatic, thats a half degree swing
<clever> seccus: just a bare AVR wired to a usb serial adapter and a desktop
<clever> i think so
<clever> hyper_ch: 30
<clever> i just found the iphone box sitting on the door step one day
<clever> UPS didnt even ask for a signature!
<clever> he switched to iphone :P
<clever> i wrote my own android app to control it
<clever> oh right, he wanted to turn it up
<clever> i have caught my dad putting ice cubes on the sensor before, because he couldnt turn the heat down :P
<clever> a cat sleeping on the sensor would mess with things
<clever> there is a large window in the kitchen
<clever> i woke up at 2am :P
<clever> thats the sunlight
<clever> my dad already complains enough about the network port on the thermostat!
<clever> lol, no network port on the coffee maker, yet
<clever> so synergy "automaticaly discovers" what display is to the left of the laptop
<clever> which redefines the monitor layout
<clever> and that script would swap out synergy config files, and SIGHUP synergys
<clever> i once configured udev to run a script, based on which usb mouse i plugged in
<clever> anything found by that can be setup in a udev rule to run a command
<clever> run this, then plug something in
<clever> [root@amd-nixos:~]# udevadm monitor
<clever> monitor will print the received events for:
<clever> thd device detection is via udev
<clever> udev is now part of systemd
<clever> let me see where i left that pesky VGA cable, i need to get another display onto this laptop
<clever> ive noticed xfce just auto-configures any newly connected monitor
<clever> in this case, its meant to run on a laptop, and setup NAT between the wired and wifi
<clever> ive also made a full network boot setup using the same kernel/initrd pair
<clever> you could then ssh into the nixos, format the drive, and install nixos as usual
<clever> seccus: if you unpacked that tar to / and ran /kexec_nixos, then the current OS will improperly shutdown, and nixos will prompt start up, hijacking the entire CPU/RAM
<clever> so you can just unpack that tar to / on any machine lacking nix, and the bash script just works (that setup will lack nix itself, so there is no easy way to manage the resulting /nix)
<clever> seccus: and line 39 makes a tarball containing everything that the bash script depends on
<clever> seccus: lines 12-33 generate a bash script that depends on the kernel&initrd
<clever> seccus: lines 5-11 take the kernel and initrd from a nixos build, and copy them to a dedicated package (and that initrd contains the whole rootfs)
<clever> seccus: you can even do insane things like have a bash script that refers to a tarball containing an entire nixos install
<clever> seccus: yeah
<clever> seccus: so your script can run any program it wants, without cluttering up what the user has or conflicting with the versions a user already has
<clever> seccus: and if you do something like: export PATH=${firefox}/bin/:$PATH in the script, then it can just run firefox, but firefox wont be installed for the user
<clever> pierre__: pkgs.fetchFromGitHub will clone it and return the path its been cloned to
<clever> jluttine: i also see it in apacheHttpd
<clever> apacheHttpd.out 22,480 x /nix/store/70pg800wr2gy9fnab0v3xn456sflkl64-apache-httpd-2.4.25/bin/htpasswd
<clever> phg: it would have to be ran here, and write the cache somewhere under $out, and $out eventualy gets a symlink at /run/current-system/sw/
<clever> phg: ah, i cant see anything in systemPath that runs mandb
<clever> phg: it might be that the mandb at nixos build time isnt finding it
<clever> sphalerite: "man time.h" works on my old gentoo machine
<clever> phg: line 26-36, i dont see it adding the 0p section
<clever> also, mandb cant be ran, because the store is immutable
<clever> phg: not sure about that
<clever> phg: i think the problem is that there is a . in the manpage name, and man thinks its a path in the current directory
<clever> yeah
<clever> -small waits for fewer tests, and doesnt wait for hydra to build everything
<clever> pierre__: nixos-unstable-small is only 2 hours behind
<clever> dhess: imports is a lot more powerful
<clever> dhess: and nixops doesnt have a module framework, so the different files cant easily refer to eachothers return values
<clever> dhess: require is specific to nixops
<clever> srhb: (import <nixpkgs/nixos> { configuration = ./configuration.nix; }).system
<clever> Cheng: paths have their own type in nix, src = ./archive.tar.bz2
<clever> dhcp should run automatically when a link is detected
<clever> try "sudo systemctl restart nix-daemon"
<clever> looks like a problem with nix-daemon
<clever> playX_: does it say anything else?
<clever> and if you try firefox a second time?
<clever> does it happen if you try again?
<clever> EOF doesnt say much, i need context of where its happening
<clever> can you paste more of that error?
<clever> ah
<clever> can you pastebin the full output and your configuration.nix file?
<clever> try enabling that one as well
<clever> and youve done nixos-rebuild switch?
<clever> playX_: you want to turn on the first option in here: https://nixos.org/nixos/options.html#drisupport32bit

2017-11-17

<clever> Unode: you may need to nix-channel --update first
<clever> fpletz: the most broken part, is that the X pinentry stops working the instant i make even 1 ssh session into the machine
<clever> fpletz: and i always run screen over ssh, and they cant seem to share
<clever> fpletz: it also tends to ask in a broken way on tty's, and displays a password prompt, but cant actually accept input, so i wind up running my password in bash!
<clever> fpletz: i found that the gpg module in nixos is rather broken, if i ssh into the machine, that steals control of gpg, then it asks on the wrong tty when i try to make use of the agent
<clever> Jackneillll: i only see 5.9 on master and staging
<clever> Jackneillll: clone nixpkgs master and then run "nix-repl ." and try to tab-complete qt
<clever> hodapp: i cant test it on this end because i lack the library behind the sign-in thing
<clever> hodapp: have you tried it with: nix-shell -p '(python35Packages.python.withPackages (p: [ p.tensorflowWithCuda ]))'
<clever> fusion809: you need to actually enable os probber
<clever> universalpackage: nix-build '<nixpkgs>' -A patchelf --argstr system i686-linux
<clever> adamt: yeah, kde works differently, it will detect if NM is on, and auto-install plasma-nm
<clever> you need to networking.networkmanager.enable = false; to reverse that
<clever> turning gnome on automaticaly turns on network manager
<clever> root____1: do you have KDE enabled?
<clever> root____1: 404
<clever> root____1: what is the error?

2017-11-16

<clever> anyways, its getting late here
<clever> then the existing seperation of build and runtime will just do its job
<clever> yeah, setup a cross-compile between dynamic x86 linux, and static x86 linux
<clever> and you dont want to spend the next week fixing every single package in the closure :P
<clever> thats a bit extreme, build only tools like pkg-config can still be dynamic
<clever> and it doesnt recursively enable static, do the package may fail to link at some point (probably when the final app links)
<clever> so it will only work if the configure script of that package can obey them
<clever> steveeJ: alll it does is inject 2 configure flags
<clever> if qemu-user was dynamic, the host ld.so would respond to ldd probing guest binaries, causing host libs to appear in all ldd queries
<clever> steveeJ: 3 things had to be done a little difference, zlib, glibc, and glib
<clever> steveeJ: an example of something i did that was fully static: https://github.com/cleverca22/nix-misc/blob/master/qemu-user.nix
<clever> yeah
<clever> balsoft: probably
<clever> it wont even fit
<clever> avn: the slide scanners ive looked at are just usb webcams, not proper scanners
<clever> balsoft: i think you have to add that package to https://nixos.org/nixos/options.html#sane.extrabackends
<clever> the only cdrw ive ever used under linux worked under k3b, but not from CLI, even when using the exact same args k3b used
<clever> yegortimoshenko: that is added by using the makeScope function
<clever> or wrap the whole thing in ( and )
<clever> pie_: lists have a higher priority, so that is a list of 5 items, 3 strings, and 2 operators
<clever> yep
<clever> boxofrox: this returns the 2nd hash in the error message
<clever> 0sslrbd0b64gxxcc02afjv7fwkmn4i8w19win08yjvqbr0clgfh1
<clever> [root@amd-nixos:~]# nix-hash --to-base32 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b --type sha256
<clever> boxofrox: it changed the base for the hash
<clever> yegortimoshenko: and yeah, there is no way to override values within xfce_self, so your only option is to .override everything you want to impact
<clever> yegortimoshenko: all of those packages use a new instance of callPackage, and will search within the deps // xfce_self set
<clever> then just fill the list (where zlib is) with the right nix packages, and it should work
<clever> you can then run that bash script on an ELF file to patch it
<clever> hyper_ch: when nix-build is ran on one of these, it generates a bash script
<clever> its also in nixos-unstable-small
<clever> joko: there is a hydra-s3-backup-collect-garbage script in hydra
<clever> joko: line 26 runs mirror-nixos-branch, and gives it the channel name and a link to that hydra job
<clever> joko: and only if that jobset passes, will it update the channel
<clever> joko: yeah, lines 44-54 control what hydra jobset each channel should wait on
<clever> joko: nixos-mirror-branch on https://github.com/NixOS/nixos-channel-scripts/
<clever> joko: it just always builds the channel tarball, but only if the tests pass will that be copied to the website
<clever> joko: nixos handles that with an external script
<clever> hydra only ever uses nix-build
<clever> joko: running a command is easy, just pkgs.runCommand, but it will be in a sandbox and cant do too much "fun" stuff, and everything is pure, so it will never know the previous outcome
<clever> pie_: nix-shell always runs bash on the inner shell
<clever> so the emulated binaries can make full use of all of the host cores
<clever> every thread in the guest process, becomes a thread on the host
<clever> joko: which comes from lines 10&11 on default.nix
<clever> and then either point the weak arm board at them, or point a hydra at them to pre-build
<clever> you can turn every spare x86 machine into an arm build slave
<clever> yeah
<clever> joko: and then with the right nix.extraConfig, you can convince nix that the machine supports arm binaries (read the patch for the config name)
<clever> joko: applying that nix override to the nix used by the host (via configuration.nix nix.package) will add support for a new nix.conf flag
<clever> joko: then the system can just run any arm binary
<clever> joko: to use the stuff in that github, you need to nix-build the qemu and run the register script in result/bin/
<clever> joko: more cores and more machines will always help, i believe
<clever> joko: its somewhat slower then a normal arm machine, but you have more cores, and can throw more x86 machines at it, which can balance out
<clever> pie_: also keep in mind that setting it to an empty string, and unset have different mechanics
<clever> pie_: make also has a "feature" where just -j with no number, runs infinite jobs!
<clever> you might be able to set it before nix-shell is even ran
<clever> but manually setting it happens after that startup
<clever> pie_: setup.sh will turn 0 into a number based on your cores, during the startup
<clever> mbrock: bin is the default output for "${lzma}" because its first
<clever> [ "bin" "dev" "out" "man" "doc" ]
<clever> mbrock: [clever@amd-nixos:~]$ nix-instantiate --eval -E "with import <nixpkgs> {}; lzma.outputs"
<clever> pie_: subscribed
<clever> joko: these are some derivations ive used to trick an x86 machine into sucessfully running ARM binaries
<clever> joko: so its simpler to always do a "native" arm->arm build, but that could itself be done under emulation
<clever> joko: the cross-compile stuff in nixpkgs was still a bit wonky last time i looked at it, and doesnt support enough to build a full NixOS, and has more issues down the road when using nix-env
<clever> sounds like an issue that should be opened on nix
<clever> i think the problem, is that the cores option is handled by nix-build/nix-daemon, and nix-shell and nix-instantiate arent dealing with it
<clever> yeah, that does sound like a bug
<clever> and also line 810 of the same file
<clever> pie_: so nix-build uses how many cores when doing the same derivation?
<clever> pie_: ignores it how, is it always building with 1 core?, does nix-build obey it differently?
<clever> Taneb: what channel are you on?
<clever> Taneb: nix-shell -p llvm_5
<clever> Yaniel: nix-build -E 'with import <nixpkgs> {}; enableDebugging hello'
<clever> kuznero: if you set dontPatchELF = true; in the derivation, it will skip that step
<clever> kuznero: which runs ldd, and deletes any rpath entires that appear unused
<clever> kuznero: in the fixup phase is a call to patchelf --shrink-rpath
<clever> sphalerite: if you wanted to get the hash over the entire file
<clever> sphalerite: and random writes to part of the file would require rehashing the entire thing
<clever> sphalerite: not all filesystems store the hash of the contents
<clever> sphalerite: while a content-addressed FS doesnt know how long to wait
<clever> sphalerite: the main difference between a content addressed FS, and auto-optimize, is that nix will wait until the build is done and becoming immutable to hash things
<clever> sphalerite: yeah, the dedup is increasing the usage
<clever> wont be a problem if your only working on linux
<clever> and it always returns 32bit LINUX versions, even if you use pkgsi686Linux on a darwin machine
<clever> but it returns 32bit linux versions of paths for you to use
<clever> it wont force the whole system to change
<clever> so installing something old like skype on darwin, gives you the 32bit linux binaries!
<clever> only problem with pkgsi686Linux and callPackage_i686, they force 32bit linux, even if used on darwin
<clever> and callPackage_i686
<clever> pkgsi686Linux
<clever> there is also a pkgsi686 atrribute
<clever> or import the <nixpkgs> { system = "i686-linux"; } variant
<clever> ah, nix-build if you just want the paths
<clever> kuznero: nix-env -iA nixos.hello --argstr system i686-linux
<clever> kuznero: yeah
<clever> yep
<clever> systemd has a flag like that, to repair things after pivot_root
<clever> check the docs to see if a unix signal can make it reopen the socket?
<clever> that sounds plausible
<clever> check /proc/PID/fd/ on the other end, to see what its listening on, and also the lsof -p PID output
<clever> unix socket?
<clever> strace -ff -o logfiles
<clever> oh, and strace on curses apps is messy
<clever> and what its not finding
<clever> sphalerite: what about stracing tmux, to see how it connects to the daemon
<clever> screen can still type, but silently looses all output, leaving you blind and thinking it hung
<clever> that magic symlink even works if the binary was deleted and replaced by an imperative package manager
<clever> but /proc/PID/exe lets me run the old version
<clever> sphalerite: ive sometimes seen screen break badly when it gets upgraded
<clever> sphalerite: the screen client isnt compatible with the screen server
<clever> yep
<clever> the map should also be removed
<clever> so just put this into imports, "${systemd-digitalocean}/module.nix"
<clever> systemd-digitalocean is a variable pointing to the git clone
<clever> yeah
<clever> dhess: your adding this file to the imports list
<clever> dhess: and that default.nix in there is not a nixos module
<clever> dhess: systemd-digitalocean will be a variable containing a path to the root directory
<clever> once i see a gist of the current nix file and the error, i can help more
<clever> dhess: you may need to use (import <nixpkgs> {}).fetchFromGitHub to get around that problem
<clever> because the value of the overrides in pkgs depends on the value of imports
<clever> dhess: one thing to note, is that you cant use the pkgs attribute when building the imports list
<clever> dhess: can you gist your current configuration.nix or nixops deployment and i can check it?
<clever> hows it working?
<clever> ah
<clever> Filesystem Size Used Avail Use% Mounted on
<clever> /dev/sda1 73G 62G 12G 85% /
<clever> srhb: last i heard, every build of every package in nixpkgs totals to about 80gig
<clever> srhb: if you use the main nixos/release.nix, it may need upwards of 80gig of space, just to download everything from the binary cache
<clever> dhess: yeah

2017-11-15

<clever> fearlessKim[m]: and baseDir is just /var/lib/hydra/
<clever> fearlessKim[m]: you could create a dedicated user for the service, and set createHome
<clever> b0f0: that configures and installs vim
<clever> b0f0: https://github.com/cleverca22/nixos-configs/blob/master/vim.nix this is a nixos module i can add to configuration.nix under imports
<clever> fearlessKim[m]: do you want it to be a read-only empty, or a writable empty?
<clever> joko: yep
<clever> joko: so it will rely on the VM system obeying the bootloader config in /boot/, and the guest having the right /boot partition mounted
<clever> joko: nixops will update /boot/ every time it deploys
<clever> fearlessKim[m]: /etc/kbd is doing exactly that as well
<clever> joko: one special thing to keep in mind, is that nixops 100% ignores the remote /etc/nixos/ dir, so your deployment file must configure everything required to make it boot and get internet
<clever> joko: this tells nixops to ssh into a random netbook, over my VPN, and deploy updates
<clever> the only thing you have to manualy handle, is provisioning new machines, and possibly installing nixos on them (if you cant clone something)
<clever> joko: nixops will basicaly just nix-copy-closure the updates over, and activate them
<clever> joko: after you install nixos, you can just tell nixops to use the "none" backend, and give it an IP
<clever> joko: the "none" backend should be
<clever> joko: that machine is managed by nixops, so it never has "nixos-rebuild" or "nix-build" directly ran on it
<clever> joko: you must use proper slaves, and/or put localhost in a secondary file via https://nixos.org/nixos/options.html#hydra.buildma
<clever> joko: so localhost will just never work in /etc/nix/machines
<clever> joko: the slave side (after ssh'ing into itself) is now waiting on that lock
<clever> joko: when the master side started the build, it grabbed a ${out}.lock file in /nix/store to prevent concurrent builds of X
<clever> joko: oh, i think i know what the problem is
<clever> joko: let me check the source some more...
<clever> joko: it makes every job use all cores
<clever> ah, docs say its valid
<clever> joko: 0 build cores doesnt sound right, hmmm
<clever> joko: what is in /etc/nix/nix.conf ?
<clever> joko: and then 6496 got the lock, and launched a 6516 slave
<clever> which has ssh'd back into the machine
<clever> joko: which is linked to the nix-daemon at 6468
<clever> joko: ok, so i can see that pid 6467 is handling the nixos build
<clever> joko: the space and H are missing
<clever> joko: that doesnt look like the right output
<clever> that will reveal a lot of details