2019-07-20

<clever> karetsu: i think part of what is dropping dpms for me, is that i'm running synergy on my systems
<clever> jcrd: depends mostly on if a nixos test is failing vs how slow the darwin builds are
<clever> karetsu: try opening its config and see what its set to?
<clever> karetsu: try installing xscreensaver? yes that sounds backwards
<clever> ,tofu delan
<clever> delan: or just tofu it
<clever> jcrd: nixpkgs-unstable doesnt test the nixos stuff, but does wait for darwin builds to finish, so mac users have cache coverage
<clever> jcrd: nixos-unstable has a lot of nixos testing done, to make sure it wont brick a nixos machine
<clever> karetsu: turning off, or blanking?
<clever> karetsu: what about `xset -dpms` or `xset dpms force on` ?
<clever> freddie-freeload: that would do it
<clever> ashkitten: so it should have still found it
<clever> ashkitten: the efi vars contain the partition uuid for the ESP
<clever> ashkitten: thats not where it would fail
<clever> iqubic: google the printer model and linux
<clever> freddie-freeload: and grub supports "removable" efi, where it uses the same filename as the usb stick, tricking the bios into booting without having to mess with efi vars!
<clever> freddie-freeload: grub even supports installing both at once on the same /boot/
<clever> freddie-freeload: grub supports both legacy and efi
<clever> -boot
<clever> freddie-freeload: i find grub is much better then systemd
<clever> freddie-freeload: either boot the USB again with efi, or do a legacy bootloader install, grub is what i prefer
<clever> freddie-freeload: you didnt boot via efi, so you cant configure the machine properly for booting via efi
<clever> freddie-freeload: if you boot back into the installer, what does `efibootmgr -v` print?
<clever> freddie-freeload: then its nothing to do with kernel modules
<clever> freddie-freeload: what error does it give when it fails to boot?
<clever> infinisil: in the end, i had to fix that 2nd bug before i could bisect the 1st bug!
<clever> infinisil: the problem was an unrelated bug in the middle, that also had zero output, and i was trying to just `git bisect skip` it all away
<clever> infinisil: the multi-day git bisect is over! https://github.com/NixOS/nixpkgs/pull/65133
<clever> worldofpeace: i'm heading off to bed now, PM me if you find any results
<clever> worldofpeace: ^^^
<clever> on each IF
<clever> worldofpeace: testing the fix now...
<clever> worldofpeace: correct, and it only worked if there was a single hdd
<clever> worldofpeace: it boots!
<clever> worldofpeace: ive gone digging thru qemu source before
<clever> worldofpeace: looking into the fix now
<clever> Netsu: by default, `outputs = [ "out" ];` so you only have $out to install to
<clever> Netsu: a derivation is only ever able to install to its outputs, all in the /nix/store/, all starting with a hash you cant control
<clever> worldofpeace: i gave up doing skip whenever it failed to build, and just debugged why, lol
<clever> worldofpeace: Bisecting: 293 revisions left to test after this (roughly 8 steps)
<clever> ashkitten: in the terrabytes, gchristensen knows the full number, its all in S3
<clever> Henson: cache.nixos.org currently has no garbage collection at all
<clever> Henson: enable plymouth

2019-07-19

<clever> alienpirate5: overrideAttrs
<clever> alienpirate5: every attribute passed to mkDerivation becomes an env var
<clever> worldofpeace: Bisecting: 13739 revisions left to test after this (roughly 14 steps)
<clever> ornx: nuke references was ran on the file
<clever> nixos should generate multiple modulepath entries in the config
<clever> ornx: find the main config file for X (read the display manager config) and then look for ModulePath in there
<clever> simukis_: you may need to override the unpackPhase, or use pre/post unpack to tweak things
<clever> simukis_: how different do you need things to be?
<clever> simukis_: it always unpacks it to $NIX_BUILD_TOP, and then sets $sourceRoot to the path relative to that, and then cd's into the dir
<clever> Thra11: http:// caches default to 50, the base class for all stores defaults to 0, and ssh doesnt override the default, so its 0, the highest priority
<clever> Thra11: cache.nixos.org is 40, hydra defaults to 100, so nix will prefer using cache.nixos.org when possible
<clever> Thra11: correct
<clever> Thra11: there is a nix-cache-info file in the root, that sets the priority
<clever> thats just defining a function
<clever> yes
<clever> .override changes the params on line 1, where you put { stdenv }:
<clever> eraserhd: that wont be passed to mkDerivation at all
<clever> // wont
<clever> passthru will persist thru .overrideAttrs
<clever> thats my guess
<clever> eraserhd: ive always prefered using self.callPackage
<clever> but at that point, just use chmod/chown :P
<clever> you could even configure sudo to only allow editing certain files, and not allow running things as user X
<clever> yep
<clever> sudoedit will obey whatever you set $EDITOR to
<clever> hpfr[m]: i believe so
<clever> hpfr[m]: `sudo vim` causes root to own vim files in your $HOME, which then breaks using vim without sudo
<clever> hpfr[m]: you want sudoedit, not sudo vim
<clever> yeah, it will just delete everything that is garbage
<clever> GiGa: nix-collect-garbage might also work, it will just delete everything you can delete
<clever> GiGa: find /nix/store -name '*.drv' -size 0 would probably list them all
<clever> GiGa: makes the builds more predictable if the inputs always have the same timestamp
<clever> GiGa: thats normal for /nix/store/
<clever> GiGa: nix-store --delete /nix/store/58jg89i8h5k4faqprfs7qqfy2w17qkz3-initrd-kmod-blacklist-ubuntu.drv
<clever> GiGa: an improper shutdown truncated that file, it should not be 0 bytes
<clever> GiGa: ls -lh /nix/store/58jg89i8h5k4faqprfs7qqfy2w17qkz3-initrd-kmod-blacklist-ubuntu.drv
<clever> andi-: definitely works
<clever> ah yeah, and the iohk hydra also has redirects in place, its actually hosted on s3
<clever> andi-: probably
<clever> ornx: one min
<clever> rfold: but its not clear why it needs the callPackage
<clever> rfold: line 14 is missing a {} at the end,
<clever> rfold: yeah, pastebin the whole nix file
<clever> Denommus: this will unpack all of the .deb packages in a vm, and then compile the package against them, all in a nix sandbox
<clever> Denommus: yes
<clever> probably
<clever> MarcWeber: there should be a libnetpbm.so symlink
<clever> xdxd: nix-store -q --deriver /nix/store/37k4jrrivhqhj8b0ibnxksy7ywyiqnra-sqlite-3.28.0/
<clever> xdxd: cant think of what else to check
<clever> gchristensen: yep
<clever> gchristensen: 2019-07-19 11:56:39 < rmra> clever: complaining is something i have already done, but in Portugal, the normal answer is "this is how it is, and stays"...
<clever> xdxd: you want to add the extra-libraries to your main cabal file, and regenerate the stack2nix output
<clever> gchristensen: and he lacks access to the router config
<clever> gchristensen: i believe rmra's issue is the router giving our v6 config, but then null-routing all v6 traffic
<clever> xdxd: in your cabal file, reference sqlite the same way direct-sqlite does
<clever> static linking is weird like that
<clever> xdxd: you need to add sqlite to your main binary as well
<clever> xdxd: is it direct-sqlite or something else that fails to link?
<clever> xdxd: that looks good
<clever> rmra: ack, thats why i hate those boxes, you cant replace the router half
<clever> rmra: is the router also a modem, or seperate?
<clever> rmra: ah
<clever> xdxd: the files stack2nix generates are likely where the problem is
<clever> rmra: it will only have trouble on servers that support both v4 and v6
<clever> xdxd: and is the c sqlite in the buildInputs?
<clever> xdxd: yeah, that should do it
<clever> rmra: they dont allow you to complain?
<clever> rmra: then complain to your ISP
<clever> rmra: fix your router to stop doing that
<clever> rmra: then the problem isnt nixos, the problem is your router giving out an addr that doesnt work
<clever> xdxd: probably just a normal package override against pkgs.sqlite
<clever> rmra: does `ip -6 addr` show an address other then fe80?
<clever> xdxd: you need a static build of sqlite in the buildInputs
<clever> rmra: why is it imposible to update the machine?
<clever> rmra: you probably need to reboot to fully apply that change
<clever> so both options are doing the same thing
<clever> rmra: networking.enableIPv6 sets net.ipv6.conf.all.disable_ipv6 for you
<clever> rmra: networking.enableIPv6
<clever> ornx: all-packages.nix
<clever> ornx: 19.09 doesnt exist yet, the only thing newer then 19.03 is nixos-unstable
<clever> nh2: dont think so
<clever> nh2: yep
<clever> nh2: any time you want to use gcc
<clever> nh2: and then you name one of those attrs in nix run
<clever> nh2: shell.nix should return an attribute set
<clever> nh2: but that will put foo into PATH, not give you the env vars of the foo drv
<clever> nh2: nix run -f shell.nix foo
<clever> and its the remote machine that gives a chunk of openvpn config to the client
<clever> openvpn doesnt setup routes until it contacts the remote machine
<clever> exarkun: yeah, that could be the issue
<clever> exarkun: it also helps to understand now tcp works, and tcpdump every interface along the path, to confirm if its doing the right thing at each step
<clever> exarkun: https://gist.github.com/cleverca22/136dfc7d28a5843cc5bb30b52040a251 is how i made things work in the past
<clever> the impurities!!!
<clever> gchristensen: i think this is a stdenv that uses /usr/bin/cc to build things
<clever> samueldr: ah, hadnt heard of that before
<clever> which i had made note of
<clever> gchristensen: somebody that was thinking of redoing the stdenv based on the lfs books
<clever> -rw-r--r-- 1 clever clever 641 Mar 9 2016 insane
<clever> 2016-03-09 06:13:24 < Darksecond> clever: I'm a bit silly and like to do a LFS style build with nix as the package manager (to get a better understanding about nix)
<clever> gchristensen: and i dont think ive seen somebody using nix without nixpkgs, beyond basic examples
<clever> gchristensen: nix and nixpkgs are fairly tangled together
<clever> s/8/0/
<clever> gchristensen: nixpkgs is what is responsible for turning 8 into $(nproc), so that part should also be moved to nixpkgs!
<clever> *looks*
<clever> ah

2019-07-18

<clever> so you can under-estimate the cpu usage during parts of the build, and have idle cores
<clever> some derivations dont have that, and will only use 1 core each
<clever> gchristensen: also mention enableParallelBuilding
<clever> lol
<clever> infinisil: ah, i was wondering if definitions might be of use
<clever> most attr based submodules
<clever> systemd.services = [ { name = "foo"; .... } ];
<clever> behind the scenes, its actually a list type
<clever> which might be dependant on the attr names
<clever> gchristensen: it may copy the values of some defaults, and then overwrite things that should be at defaults
<clever> worldofpeace: down to 13739 commits
<clever> worldofpeace: still bisecting, lol
<clever> gchristensen: my docker image could take advantage of this, to reuse the same code, and properly obey users.extraUsers
<clever> gchristensen: already doing that, but generating passwd was a pain
<clever> gchristensen: and there was a recent nixpkgs pr that actually helps, something about if mutableUsers = false;, it can pre-generate passwd
<clever> gchristensen: main issue that needs solving, is creation of users
<clever> Miyu-chan: yep
<clever> Miyu-chan: create a file in a tmpfs, which will be lost on reboot
<clever> Thra11: then nix-store -r to build it there, and nix-copy-closure the product back
<clever> Thra11: you can even nix-copy-closure a .drv file to another box
<clever> Thra11: nixos-rebuild dry-run will only do the nixexpr half, and print that drv
<clever> Thra11: yeah, just run `nix-store -r /nix/store/foo.drv` on the top-level drv
<clever> Miyu-chan: nice
<clever> it just skips the nix expression half of things
<clever> Thra11: it will also try to build it, if it cant find it on a cache
<clever> strap the USB stick to a carrier pidgeon!
<clever> then tar that up, and move it to another machine, however you can
<clever> to download foo from the cache, directly to the cache dir
<clever> Thra11: oh, you can also `nix copy --from https://cache.nixos.org --store file:///home/clever/cache /nix/store/foo`
<clever> Thra11: and `nix-copy-closure` is around
<clever> Thra11: you can also just `nix-store -r /nix/store/foo` to download something from the binary cache
<clever> the storepath hash, not the sha256 hash
<clever> yep
<clever> as are its dependencies
<clever> the .nar.xz is within the narinfo
<clever> Thra11: /nix/store/<hash>-<name> is at https://cache.nixos.org/<hash>.narinfo
<clever> Thra11: that will let you manually mirror the cache, and then use the local copy
<clever> Thra11: then nix copy --from file:///home/clever/cache /nix/store/foo
<clever> Thra11: you want to download the .narinfo and .nar.xz files (maintaining the relative paths) to a local dir
<clever> Thra11: correct
<clever> gchristensen: have you seen my recent stuff with runit and docker?
<clever> `sudo -i` then `nix-channel --update` may help
<clever> cinimod: yeah
<clever> cinimod: it was deleted from nixpkgs in nov of last year
<clever> Date: Sun Nov 4 20:12:55 2018 -0600
<clever> atlas is broken and can apparently be removed.
<clever> commit 95373d3634d6431037d8d752513392227c76c66b
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ git log --patch origin/master pkgs/development/libraries/science/math/
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ git log --patch origin/master
<clever> cinimod: it began failing with version 3.10.3, so if you go to an older version (on an older nixpkgs) it will work again
<clever> cinimod: its only flagged as broken on darwin!
<clever> cinimod: thats in nixpkgs rev 89b618771ad
<clever> cinimod: what does `nix-build '<nixpkgs>' -A atlas` say?
<clever> it will be a bash env var
<clever> matt`: just plain $src
<clever> so its grabbing that package!
<clever> > pkgs.src
<clever> matt`: i see, line 8 is doing self.src, and self is line 1, the nixpkgs self
<clever> matt`: you want to use $src, no {
<clever> matt`: if you nix-instantiate the drv, then `nix-store --query --binding postFixup /nix/store/foo.drv` does it show the changes?
<clever> matt`: can you gist the overlay?
<clever> cinimod: you can also use `nix-instantiate --find-file nixpkgs` to just find the exact nixpkgs its currently using
<clever> cinimod: nix eval nixpkgs.lib.version
<clever> cinimod: pkgs/development/libraries/science/math/atlas/default.nix: name = "atlas${optionalString withLapack "-with-lapack"}-${version}";
<clever> cinimod: i would start by looking at the atlas-3.10.3 expr in nixpkgs, to see why its broken
<clever> turion: yes
<clever> turion: that will force openvpn to get its deps from the 2nd nixpkgs
<clever> turion: you will need a nixpkgs.config.packageOverrides also, to set `openvpn = (import /path/to/nixpkgs {}).openvpn;`
<clever> cinimod: i prefer testing things with nix-build
<clever> cinimod: then its nix-env being weird, its likely loading from a diff nixpkgs
<clever> cinimod: what happens if you nix-build '<nixpkgs>' -A python37Packages.myScikits-odes
<clever> cinimod: nope
<clever> cinimod: not sure whats up with that
<clever> cinimod: and you want to apply it to the right pythonPackages, there is also a python3Packages
<clever> cinimod: you should probably be using nix-build for testing, not nix-env
<clever> cinimod: sounds normal
<clever> turion: look up disabledModules in the nixos manual
<clever> cinimod: what does `nix-instantiate --find-file nixpkgs` return?
<clever> cinimod: https://gist.github.com/cleverca22/993d7c40717b9dfbca4748e987aa32d2 edited, it is now a nixpkgs overlay, that contains a python overlay
<clever> cinimod: https://gist.github.com/cleverca22/993d7c40717b9dfbca4748e987aa32d2 this will return a modified version of pythonPackages, with 2 things added
<clever> cinimod: sets arent recursive by default, in this case, you want either self.mySundials, or just rename line 4 to sundials_3_lapack
<clever> cinimod: can you gist your expr?
<clever> cinimod: this gives an overlay to pythonPackages, which can replace what all python packages think .foo is
<clever> > (pythonPackages.override { overrides = self: super: { foo = 42; }; }).foo
<clever> cinimod: or use a python overlay to add it to pythonPackages
<clever> cinimod: callPackage ./foo { sundials_3_lapack = mySundials; }
<clever> cinimod: pythonPackages.callPackage maybe?
<clever> mkaito: i think you want to modify things, to put the closure into systemd.services.foo.path
<clever> mkaito: yes
<clever> mkaito: that will setup PATH for the service automatically
<clever> mkaito: systemd.services.foo.path = [ pkgs.hello ];
<clever> _pash: you can only extend the tail
<clever> _pash: yeah

2019-07-17

<clever> lol
<clever> lol
<clever> but that only shaved 200 commits off, lol
<clever> worldofpeace: found a bad rev!
<clever> yeah, switch isnt perfect currently
<clever> exarkun: iptables is a bit of a mess, but restarting firewall.service should wipe that
<clever> though nixops doesnt really give access to that feature
<clever> and it will bake that `-I nixpkgs=` into the state file, and impact all future deploys
<clever> you can also `nixops modify -d name -I nixpkgs=https://github.com/nixos/nixpkgs/archive/GITREV.tar.gz deployment.nix`
<clever> exarkun: so its behaving the same as if you had done nix-channel --update
<clever> exarkun: `nix eval nixpkgs.lib.version` on both machines
<clever> exarkun: but is it the same nixpkgs version?
<clever> worldofpeace: exactly
<clever> worldofpeace: min-free in nix.conf, it will auto-gc when it gets too low
<clever> worldofpeace: its basically a fork of tmux, that lets you get get in without having to deal with port forwards
<clever> worldofpeace: ssh ro-qNc6p0arIvn1FhAts8CrZAPkc@to2.tmate.io
<clever> worldofpeace: tmate can
<clever> Bisecting: 14740 revisions left to test after this (roughly 14 steps)
<clever> shaved 3k commits off!
<clever> worldofpeace: Bisecting: 16739 revisions left to test after this (roughly 14 steps)
<clever> Bisecting: 19146 revisions left to test after this (roughly 14 steps)
<clever> worldofpeace: it sometimes has trouble, if i test multiple release branches at once, so ive reset with just a single good&bad
<clever> worldofpeace: bisect is being a bit dumb, so i'm having to manually pick revs to test
<clever> worldofpeace: more that the bisect is now 25 commits shorter,lol
<clever> worldofpeace: progress-ish
<clever> Bisecting: 13825 revisions left to test after this (roughly 14 steps)
<clever> worldofpeace: stage-1-init.sh may have to be modified more
<clever> Bisecting: 16854 revisions left to test after this (roughly 14 steps)
<clever> luckily, i just did a GC and had 20gig free, so i can afford a couple mass-rebuilds, lol
<clever> worldofpeace: running into a couple build failures...
<clever> Yaniel: thats not in a let block, you want renpy6 = let version = "6.99.14"; in ....overrideAttrs(....);
<clever> worldofpeace: Bisecting: 19942 revisions left to test after this (roughly 14 steps)
<clever> worldofpeace: 18.09 fails for me
<clever> Yaniel: can you pastebin your current code?
<clever> i also havent checked, but i suspect pname + version may play more nicely, but wont help with src=
<clever> yes
<clever> its more obvious that it cant be modified
<clever> let version = "foo"; in stdenv.mkDerivatopn { ...
<clever> a let block
<clever> it leads to confusion
<clever> thats why i avoid using rec whenever possible