2019-06-14

<clever> clacke_movim: oh, that seems new
<clever> lol
<clever> it was basically your mission to break as many sites as possible
<clever> and many sites have a max length on the input, so you cant put it all in
<clever> ashkitten: it was just the entire alphabet, repeated as many times as the dns system would allow
<clever> ashkitten: i remember once having an email addr at something like abcde.......com
<clever> so i need a 2nd wifi without v6 support to get netflix
<clever> i was turning v6 support off on android, via root, but now all of my devices arent rooted
<clever> but now, if your v6 and v4 dont agree on your country, it will just block all of netflix
<clever> turning on v6 support in windows let me play stuff for a few years
<clever> so linux got the american lineup, and windows got the canadian lineup
<clever> then i figured it out, linux was on v6, and the tunnel exits in america
<clever> further testing, showed that the windows netflix refused to even admit the actors existed
<clever> but netflix+linux didnt work, so i went to the windows machine, and wut, it doesnt have star trek!?
<clever> and one day, i was talking about how netflix didnt have startrek, and pulled it up on my linux laptop, and wait, it does...
<clever> ashkitten: that reminds me, when i first setup tunnelbroker, i didnt have v6 enabled on everything in the house
<clever> turns out, the motherboard driver for cellphone charging, segfaults while trying to parse the usb descriptors for the teensy
<clever> plugged it directly into a front port, and *boom* blue-screen!
<clever> then one day i stopped using it as a usb keyboard, and took out a usb extension i was using
<clever> and all problems vanish
<clever> so just having it plugged in, convinces the game that i have a mouse
<clever> ashkitten: but it actually emulates a full mouse+keyboard
<clever> ashkitten: i had one of these programed to act as a usb keyboard, with 2 buttons
<clever> so you now have the stability of windows, on nixos!
<clever> but gpu passthru tends to be very fiddly and requires a host reboot to reset
<clever> and then stream it over
<clever> Miyu-saki: i was thinking the same thing, gpu passthru a 2nd card to a windows guest
<clever> one click down, and it just infinitely scrolls down
<clever> and then i discovered, if i boot certain games without a mouse, the forwarded wheel goes nuts
<clever> i was using synergy to control windows, so windows had no mouse attached
<clever> i once had a weird mouse problem on windows
<clever> i used mplayer to play the rtmp stream, and some custom output flags to feed it into v4l-loopback
<clever> because it was playing off a remote rtmp server, lol
<clever> it had horid latency
<clever> i used that before to force obs down hangouts's throat :P
<clever> v4l-loopback
<clever> now you can use obs to composite your hangouts screen-share
<clever> then tell hangouts to share that window
<clever> i also recently discovered a neat trick, tell obs to open a a windowed preview projector
<clever> i use obs-studio a lot
<clever> yep
<clever> linux has much better stuff, but steam probably isnt using it
<clever> if you are using something like RDP to get a 2nd isolated desktop
<clever> ashkitten: and windows has to update all of the globals when context-switching to another desktop
<clever> ashkitten: i came across a blog that went into detail, how the currently active screen is essentialy a set of global variables in the kernel
<clever> ashkitten: yeah, its a fairly crude screen-capture, and windows really isnt designed for multiple screens
<clever> Yaniel: and which port it uses is semi-random
<clever> Yaniel: it uses a range of udp ports, and the existing firewall config wont let you specify a range
<clever> Yaniel: ive been considering using wireguard to mess with that
<clever> hyper_ch2: just a matter of if you can be bothered to lookup the ports, or say f-it :P
<clever> hyper_ch2: it needs a few ports in the nixos firewall opened, or just turn the firewall off
<clever> ashkitten: ive mostly tested it nixos->nixos, to play on my laptop
<clever> ashkitten: i think it needs a monitor plugged in, but it can be off
<clever> you instead pay a monthly rate for permission to use it :P
<clever> hyper_ch2: the main different with stadia, is that its over the internet, and you no longer own the hardware
<clever> and play all the windows-only games, on real windows
<clever> hyper_ch2: so you could have a win10 box in the closest, with a beefy gfx card, and then have steam stream it to the nixos box for you
<clever> hyper_ch2: steam in-home streaming also works on nixos, so you can basically do stadia in-home
<clever> hyper_ch2: yeah, stadio is different and will let even crap machines run games
<clever> hyper_ch2: proton is valves fork of wine, it has steam integration and improvements to help with compatability
<clever> hyper_ch2: proton
<clever> ages ago
<clever> there is also a path = ../..; in nixpkgs, that will always point to itself
<clever> > pkgs.path
<clever> read that file to see how it works
<clever> nixpkgs/pkgs/stdenv/generic/make-derivation.nix: position = pos.file + ":" + toString pos.line;
<clever> Miyu-saki: and the stdenv uses that to point to an attr in the package
<clever> > pkgs.hello.meta.position
<clever> > pkgs.hello.meta.location
<clever> > pkgs.hello.path
<clever> Miyu-saki: while import doesnt save the path, the parser saves the path of every attr in every set
<clever> > builtins.unsafeGetAttrPos "a" { a=42; }
<clever> Miyu-saki: you may be interested in some of the unsafe flags
<clever> --dump doesnt preserve names
<clever> dependency information, and the actual names of things
<clever> --export and --import support the metadata
<clever> petersjt014: --dump is basically tar, and wont store any metadata
<clever> yeah
<clever> ?root= is an argument it can take, that will prepend a string to all paths, so it operates on /mnt/nix/store/
<clever> petersjt014: nix copy takes store URI's, and local is the name of the local store in /nix/store/
<clever> petersjt014: its related to nix-copy-closure, but i dont think the old syntax can do that
<clever> petersjt014: nix copy --all --to local?root=/mnt/
<clever> but you may need to patch hydra to get any useful output, like URL's
<clever> o1lo01ol1o: journalctl -f -u hydra-evaluator should show the output it does print
<clever> each ocaml thing will be a small overlay, that you apply to the ocaml packages
<clever> trace: warning: `overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: super: { … })` instead of `overrideScope (super: self: { … })`. All other overrides have the parameters in that order, including other definitions of `overrideScope`. This was the only definition violating the pattern.
<clever> yes
<clever> like: ocamlPackages.overrideScope' (self: super: { ... });
<clever> that will take an overlay
<clever> Netsu: ocamlPackages.overrideScope'
<clever> Netsu: when you use // it wont propagate to other packages in that set
<clever> Netsu: can you pastebin your override code?
<clever> o1lo01ol1o: and there is also builtins.trace, which takes a string, and an anything, and it returns the 2nd arg
<clever> > builtins.attrNames { a=42; }

2019-06-12

<clever> tobiasBora: go ahed
<clever> immae: yet another way to find nixpkgs!
<clever> nix-instantiate --eval '<nixpkgs>' -A path
<clever> and every time you do <nixpkgs> it will be translated into `builtins.findFile builtins.nixPath "nixpkgs"`
<clever> behind the scenes, nix will parse NIX_PATH and convert it into builtins.nixPath
<clever> immae: also, nix-instantiate --eval -E builtins.nixPath
<clever> with that, you can experiment to see what does what
<clever> immae: you can also NIX_PATH=something nix-instantiate --find-file nixpkgs
<clever> [clever@amd-nixos:~]$ nix-instantiate --find-file nixpkgs/default.nix
<clever> /nix/var/nix/profiles/per-user/root/channels/nixos/default.nix
<clever> [clever@amd-nixos:~]$ nix-instantiate --find-file nixpkgs
<clever> /nix/var/nix/profiles/per-user/root/channels/nixos
<clever> dminuoso: ah, i didnt make that one
<clever> dminuoso: about?
<clever> ,libraries Athas
<clever> madhukar: i'm just fairly active in irc
<clever> madhukar: some gui and audio things dont like running as root, because of security reasons
<clever> teto: a lot of those arent actually binaries
<clever> kibana.out 12 d /nix/store/6v4zl7g2pl2nyvlj47vc3igggqc5gdm3-kibana-4.6.0/libexec/kibana/webpackShims
<clever> teto: its more visible if you run nix-locate locally
<clever> teto: Data.ByteString.Lazy.writeFile
<clever> mac10688: run pavucontrol, is anything muted?
<clever> i was going to mess with hostapd
<clever> which reminds me
<clever> now that i know how it works, its fine :P
<clever> back in my day, network-manager didnt exist, and i had to figure out wpa_supplicant without internet access, just to get internet working!
<clever> mac10688: networking.wireless.enable is what i use
<clever> niten: everything nix-env manages will appear to be read-only
<clever> niten: another solution is lets encrypt
<clever> niten: your containers are in /var/lib/containers
<clever> i would just copy the keys in by hand then
<clever> niten: nixops?
<clever> that is a better solution
<clever> niten: https://nixos.org/nixos/options.html#environment.etc.%3Cname%3F%3E.mode
<clever> makes it more reproducable, because it doesnt care what the end user did to config.nix
<clever> so it ignores whatever the user has in config.nix
<clever> i try to always do { config = {}; overlays = []; }
<clever> import <nixpkgs> { config = { allowBroken = true; }; }
<clever> tA_: when you import <nixpkgs> {} you can just pass it a config attr
<clever> tA_: echo $NIX_REMOTE
<clever> tA_: try setting it to singleuser mode, rather then multiuser mode
<clever> tA_: that implies that nix-daemon isnt running as root
<clever> and double-check that `iwconfig` shows it as being online
<clever> while the ethernet is unplugged
<clever> mac10688: it has a bit of trouble switching, try restarting wpa_supplicant again?
<clever> mac10688: wpa_passphrase networkname password >> /etc/wpa_supplicant.conf ; systemctl restart wpa_supplicant
<clever> mac10688: i just use wpa_passphrase and wpa_cli
<clever> Shados: i can hit multiple caches, but not have to setup 5 nginx caches and configure every machine to use 5 different local nginx's
<clever> and its caching narinfo files in ram, rather then disk, since those are always small and requesting them is a bottleneck often
<clever> Shados: main difference from that, is that it can merge multiple binary caches into a single url
<clever> dhess: and the nixos module to run it
<clever> so i have 2 upstream caches, cachecache will check both, and then present a single cache to my LAN
<clever> this will also multiplex many caches into a single url
<clever> why not cache the ache?
<clever> but i have gigabit inside the house
<clever> dhess: basically, i have 4 nixos machines in my house, and re-downloading things from cache.nixos.org is a bottleneck
<clever> dhess: a cache for binary caches, lol
<clever> and check the dir before downloading
<clever> dhess: i think that makes it save the .nar to a dir, after downloading
<clever> dhess: that also looks like it may entirely replace cachecache, lol
<clever> dhess: ah, i dont think that existed when i set things up
<clever> dhess: nar cache?
<clever> yep
<clever> alienpirate5: `sudo -i` and then --list again
<clever> alienpirate5: every user has his own channels, and root is the fallback
<clever> alienpirate5: no
<clever> alienpirate5: what does nix-channel --list say?
<clever> alienpirate5: your nixpkgs may be too old
<clever> alienpirate5: what errors do you get?
<clever> alienpirate5: use gcc9Stdenv.mkDerivation
<clever> dhess: yeah
<clever> store_uri is the only one you really care about, thats where hydra will push things when a build finishes
<clever> no clue, lol
<clever> (thats what server_store_uri did)
<clever> and it uses this to fetch a single file from the cache
<clever> dhess: hydra build products again, it can host documentation and html pages directly thru hydra
<clever> or you could point it to blame.dhess.for.breakage.com
<clever> you could point it to a custom nginx, that uses basic auth to authenticate people
<clever> dhess: when generating hydra product URL's (which must be clickable in the browser) it will use that string
<clever> $c->stash->{binaryCachePublicUri} = $c->config->{binary_cache_public_uri};
<clever> to the source!
<clever> dhess: i dont remember what the public uri was for
<clever> dhess: actually using it though, would require aws keys on every person wanting to use it, and an s3://bucket in the cache config
<clever> dhess: so private might be simpler
<clever> dhess: the only s3 one ive setup is public, but it needed extra redirect rules to make the bucket accessible easily, and acl's to make the bucket public by default
<clever> bsima: the builder didnt produce the path it was supposed to produce
<clever> simpson: so ive been forced to just not use 2 entire disks
<clever> simpson: the firmware update util also fails

2019-06-11

<clever> Shados: its a cpu task within zfs, probably when multiple reads are already waiting in the queue, because other reads are in progress
<clever> simpson: that explains why my SSD's where locking up randomly :P
<clever>  Resolved a race condition where a write command during SATA error handling process could cause drive to hang
<clever> wheres that pdf...
<clever> simpson: oh, something else, i have 2 entire SSD's in my desktop that are just totally unused
<clever> less round trips, faster thruput!
<clever> so if it wants to read 2 nearby things, it may just ask the drive for one big chunk, that covers both
<clever> Shados: and this allows zfs to merge multiple reads together, and read up to 384kb at once
<clever> echo $((384 * 1024)) > /sys/module/zfs/parameters/zfs_vdev_aggregation_limit
<clever> Shados: `zpool iostat -r 30` then shows how many reads, of what type, and size, every 30 seconds
<clever> Shados: if the kernel is merging several read requests together, then zfs isnt detecting the merges itself
<clever> Shados: the main thing i'm looking at right now is the rrqm/s in `iostat -x 30`
<clever> Shados: ive been experimenting with grafana and zfs metrics lately to see what does what
<clever> xorax: one searches by name, the other searches by attrpath
<clever> xorax: you need a -A or -Q in there somewhere i think
<clever> so it can cache things that are used a lot, but not very often (like an hourly cron job)
<clever> simpson: and based on the hit% of both classes, it will adjust how much ram it allocates to both types
<clever> simpson: basically, zfs has the ARC, which will cache both recently used things, and frequently used things
<clever> my desktop fits entirely on nvme, so it boots damn fast
<clever> yeah
<clever> tobiasBora: the main restriction, is that the L2ARC doesnt persist between reboots
<clever> simpson: thats what the L2ARC in zfs does
<clever> xorax: nix-env -q to list all of them, and nix-env -e to remove each one, or `nix-env --rollback` to just undo the last thing you did (you can repeat rollback a few times)
<clever> xorax: you want nix-env -iA nixos.nodePackages.node2nix
<clever> xorax: that only shows channels, not packages in a channel
<clever> xorax: what are you using to search?
<clever> Athas: bingo, it was llvmPackages: 5 -> 7 (bump our default LLVM)
<clever> xorax: ^^
<clever> > nodePackages.node2nix
<clever> Athas: getting down into the mass-rebuilds now, with 83 commits left to scan
<clever> Athas: Bisecting: 84 revisions left to test after this (roughly 6 steps)
<clever> Athas: on many revs
<clever> Athas: Bisecting: 122 revisions left to test after this (roughly 7 steps)
<clever> m1cr0man: because of how the games self-update, and often tread any patching as either corruption or cheating
<clever> m1cr0man: yeah, its doing chroot's rather then patchelf
<clever> o1lo01ol1o: copy those definitions over, it just needs normal buildInputs
<clever> o1lo01ol1o: just use buildCommand = "ghc -Foo -Bar"; and dont use builder =
<clever> o1lo01ol1o: builder.sh disables 90% of the tools you need to make anything work
<clever> o1lo01ol1o: add a buildCommand or buildPhase to the derivation, and point nix-build at it
<clever> Athas: Bisecting: 4092 revisions left to test after this (roughly 12 steps)
<clever> i think the script can return 2 for skip, check the man page
<clever> and it can be tricky to write a script that can identify those automatically
<clever> but there can be other failures, that are caused by unrelated problems, which you want to skip
<clever> repeat building, and telling git if its good or bad
<clever> Athas: then checkout a rev you know works (and confirm with nix-build), and run `git bisect good`
<clever> Athas: in the nixpkgs dir, while checked out to a broken rev, run `git bisect bad`
<clever> m1cr0man: you either need to compile it with nix, or run patchelf over the binary
<clever> Athas: ahh, you can do `nix-build -A llvmPackages.compiler-rt --argstr system i686-linux` to force nix-build to do 32bit also, for testing
<clever> Athas: and one entry in that contents, is the $out path, /nix/store/<hash>-<name>/ which is based on a hash of a subset of the drv contents
<clever> Athas: <hash>-<name>.drv is based on the hash of its contents
<clever> Athas: you can also `nix-instantiate /path/to/nixpkgs -A llvmPackages.compiler-rt
<clever> Athas: nix-store --query --deriver /nix/store/foo
<clever> Athas: run nix-diff on the .drv file for both builds
<clever> zeta_0: it looks like it might only need a doJailbreak to fix it
<clever> zeta_0: and was flagged in this commit, with no mention of why
<clever> hackage2nix: disable broken Hydra builds
<clever> Date: Sat Sep 22 13:34:15 2018 +0200
<clever> zeta_0: it was already flagged as broken on this date
<clever> Date: Sat Mar 16 10:17:05 2019 +0100
<clever> zeta_0: the broken flag is mainly to save you from wasting time building something that will fail to build
<clever> zeta_0: you would want to either ignore the broken flag to see why, or check nixpkgs commit history
<clever> zeta_0: if you temporarily set allowBroken = true; what does it fail with?
<clever> Thra11: looks like one is muslc, the other is glibc
<clever> infinisil: its evil!
<clever> zeta_0: what error does it fail with?
<clever> infinisil: more likely with '' or you missing a trailing newline
<clever> infinisil: and create it with `git diff > patch-file.patch`
<clever> infinisil: i would just use patches = [ ./patch-file.patch ];
<clever> eraserhd: you would have to replace the unpackPhase = '' .... '';
<clever> eraserhd: the default unpackPhase expects $src to be either a directory or a tarball/zip
<clever> Thra11: nix-instantiate both, and then nix-diff the 2 .drv files
<clever> Thra11: yeah, i'm not sure what it will do
<clever> Thra11: oh, i didnt notice it in both
<clever> Thra11: one should be using dynamic linking, the other static
<clever> avn: you can omit the default.nix part, since thats the default!
<clever> thats about it
<clever> inquisitiv3: youll want to chown -R the dir after you boot, to make sure you own it
<clever> inquisitiv3: imports = [ ../../home/clever/nixcfg/amd-system.nix ];
<clever> inquisitiv3: i just have a git repo at /etc/nixos/nixcfg and then i do imports = [ ./nixcfg/amd-system.nix ];
<clever> inquisitiv3: if you use relative paths in configuration.nix, it doesnt really matter
<clever> i was mostly looking into how to boot linux, when you only have windows, with no external media, and no ability to flash a disk image
<clever> dont worry, i'm not going to switch back to windows :P
<clever> gchristensen: i also stumbled upon something interesting, windows can now boot from a .vhdx image on an ntfs partition
<clever> gchristensen: but that relies on having stage 1.5 in another partition
<clever> gchristensen: there are also other examples ive found, that are like chainload in grub, you just shove a 512 byte copy of the MBR at the windows bootloader, and it runs it
<clever> joepie91[m]: done
<clever> gchristensen: and at least on efi systems, thats trivial, and grub can then boot something like my kexec images
<clever> gchristensen: i was recently looking into the windows bootloader, and how to configure it to boot grub
<clever> joepie91[m]: just looked back at the original error i quoted, it makes no mention of what the storepath is, so the work-around is suddenly more complex
<clever> joepie91[m]: and it seems i already opened an issue for exactly this
<clever> joepie91[m]: to copy each output from a fetchTarball
<clever> joepie91[m]: the work-around is to use nix-copy --to local?root=/mnt/ /nix/store/foo
<clever> joepie91[m]: the error implies that something was calling builtins.fetchTarball and that has bugs with --store
<clever> joepie91[m]: point NIX_PATH to a real directory, not a tar URL
<clever> Izorkin: du -h --max=0 -c $(nix-store -qR /run/current-system) | sort -h | tail
<clever> ashkitten: it may also be down to which version of nix is being used to build it, there was a recent change to introduce pty's into the sandbox to fix stdout
<clever> ashkitten: what changes to make it start to fail?
<clever> ashkitten: the makefile might be trying to redirect > /dev/stdout
<clever> ashkitten: there was a recent mention of how you cant re-open /dev/stdout while in the nix sandbox
<clever> make[4]: write error: stdout
<clever> ashkitten: nix-env -iA nixos.gist ; gist -p dumpfile.txt
<clever> lol