2019-08-25

<clever> Darwin nixoss-iMac.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
<clever> angerman: and i'm in!
<clever> ah yeah, need a darwin box, let me see if i still have ssh to sarov...
<clever> angerman: i run into a different error on this end
<clever> error: while evaluating 'assertValidity' at /home/clever/apps/nixpkgs-master/pkgs/stdenv/generic/check-meta.nix:248:20, called from /home/clever/apps/nixpkgs-master/pkgs/stdenv/generic/make-derivation.nix:273:18:
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ nix build '(with (import ./. { crossSystem = { config = "armv6l-unknown-linux-gnueabihf"; }; }); haskell.compiler.ghc865)' --show-trace
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ git checkout release-19.03
<clever> a bisect may help, *looks*
<clever> angerman: does it behave differently when building perl on master?
<clever> angerman: i think line 21 doesnt properly support cross-compiling
<clever> while evaluating 'getOutput' at /Users/angerman/Projects/iohk/nixpkgs/lib/attrsets.nix:464:23, called from /Users/angerman/Projects/iohk/nixpkgs/pkgs/development/interpreters/perl/default.nix:22:13:
<clever> angerman: what happens if you try to build perl with a similar command?
<clever> angerman: that sounds like a bug with one of the libraries being set wrong, the error at the end should say which
<clever> angerman: at a glance, i would expect that to work, what error does it have?
<clever> you can then do baz.foo
<clever> and then you do let baz = import ./file.nix; in ...
<clever> localstore: if the file contains { foo = "bar"; }
<clever> localstore: you just have a naked expr
<clever> localstore: a let block must be key=expr; pairs
<clever> that will return whatever the file contains
<clever> localstore: in a let block
<clever> localstore: gist also helps a lot in this situation, it supports multiple files, so you can just include the whole thing and the line numbers survive
<clever> import is a nix primitive, to just load a file and get whatever value is in the file
<clever> imports is a list of nixos modules
<clever> localstore: use normal import to load a file, not imports
<clever> betaboon: stationeers needs a font installed into the prefix, or half the text is just missing
<clever> the nixpkgs winetricks is a different wine version, and the proton winetricks isnt patched
<clever> only time its been nixos specific for me, was when i had to run winetricks on the proton prefix from steam
<clever> ehh, yeah
<clever> betaboon: maybe write it up on the nixos wiki?
<clever> they both compress on-demand, and dont know how big the compression will be
<clever> nix-serve has the same limitation as hydra
<clever> ivan: what is the url to that faulty narinfo?
<clever> ivan: hydra cant report the compressed size, because it compresses things on-demand
<clever> ivan: what is the url to that narinfo?
<clever> ivan: within there, will be the compressed and uncompressed size
<clever> ivan: for a given /nix/store/<hash>-<name>, curl https://cache.nixos.org/<hash>.narinfo
<clever> hpfr[m]: acpid already handled those just fine, in the pre-systemd days

2019-08-24

<clever> Miyu-chan: id say just make a shell.nix that provides the right nixops, and tell people to run nixops inside nix-shell
<clever> Miyu-chan: ahh, a bug in the disk image its using
<clever> vika_nezrimaya: $TMP is already pointing to a temp dir you can use
<clever> Miyu-chan: how was the machine installed, what actually owns the file?
<clever> aria: its updated to whatever is defined in nixpkgs, which may not be the very newest
<clever> Miyu-chan: chown 0:0 -R /nix/store ?
<clever> aria: it gets updated automatically when nixos-rebuild updates everything else
<clever> GiGa: you may need to reboot as well, to load the kernel modules
<clever> GiGa: remove it from systemPackages, the enable does that for you
<clever> GiGa: how did you enable virtualbox in configuration.nix?
<clever> GiGa: is virtualbox visible in `lsmod` ?
<clever> so your not really gaining anything by switching
<clever> i dont think systemd supports mirroed boots at all?
<clever> ah, ive never tried the mirrored boots
<clever> for basic usage, the 1 line above is all you need
<clever> srhb: grub makes far more sense
<clever> dont explain anything!
<clever> it helps when people make the interface ultra-minimal :P
<clever> no need to reinstall anything
<clever> madhukar93: that one line should fully switch you over with zero problems
<clever> boot.loader.grub = { enable = true; efiSupport = true; device = "nodev"; };
<clever> id say this is just a bug in systemd, and you should switch to grub!
<clever> its just that systemd is stuck on the wrong default
<clever> then the problem isnt to do with installing the bootloader or having multiple
<clever> madhukar93: ah, is generation 96 the newest one, but it defaults to 89?
<clever> madhukar93: what does `tree /boot/` output?
<clever> madhukar93: what does `efibootmgr -v` output?
<clever> madhukar93: what does `efibootmgr -v` output?
<clever> madhukar93: can you put /boot/grub/grub.cfg into a pastebin?
<clever> madhukar93: is /boot mounted? do you happen to have multiple boot partitions? what is in the /boot directory of / (un-mount /boot to see)

2019-08-23

<clever> sounds like its looking in the current dir?
<clever> and how does automake search for it?
<clever> does gtk-doc actually contain gtk-doc.make?
<clever> it needs extra deps
<clever> yep
<clever> ashkitten: the release tarballs are usually just the result of running automake and autoconf in the source dir
<clever> LouisDK: also, irc doesnt highlight when you @clever, putting the @ there is making it less noticable
<clever> ashkitten: package all the things
<clever> so the patchPhase can just edit "configure" directly, its in the working dir
<clever> LouisDK: the unpackPhase copies the configure script to . before running it
<clever> heh
<clever> but that wont be true for nix
<clever> i think it just assumes an os of a certain version has a certain library
<clever> but thats not pure, and why are they even doing that??
<clever> VERSION_ID="19.09pre179307.bc94dcf5002"
<clever> $ cat /etc/os-release
<clever> LouisDK: VERSION_ID is a variable inside os-release
<clever> LouisDK: if you add libbluray to the buildInputs, the if condition on line 2 will find it, and end of story
<clever> what will it do in each situation?
<clever> LouisDK: does it have an argument to override things?
<clever> LouisDK: that wont exist due to the nix sandbox, what does configure want to do with it?
<clever> $ nix show-config | grep hashed
<clever> hashed-mirrors = http://tarballs.nixos.org/
<clever> Miyu-chan: probably
<clever> its 8am here, i should get to bed
<clever> so ssh itself shouldnt have to prompt or write anything, normally
<clever> Miyu-chan: but i think nixops is pre-loading the right keys into the file, before ssh'ing into each machine
<clever> the only real way to leak such a lock, is if you leak the entire process, or you let your children inherit that file handle
<clever> if the process holding the lock dies, or the file handle is closed, the lock is released automatically
<clever> flock is purely in-memory
<clever> and if it respects locks the same way
<clever> youll want to check the ssh source, to see how it updates the file
<clever> Miyu-chan: but if the ssh client follows different rules, ssh could potentially undo changes nixops was doing, via a multi-program race
<clever> Miyu-chan: it grabs an flock on a ~/.ssh/.known_hosts.lock file, so nixops itself cant be modifying the file twice at once
<clever> Miyu-chan: plausible
<clever> i see clips, clipit, clipgrab, but no clip
<clever> freeman[w]__: on my end, i dont see any that actually have a clip binary
<clever> freeman[w]__: you can also run `nix-locate bin/clip` locally
<clever> ,locate bin clip
<clever> Miyu-chan: are you perhaps doing 2 deploys at once?
<clever> to re-sync it when nixops changes the remote host keys
<clever> Miyu-chan: nixops.known_hosts.update also comes into play, that will modify known_hosts for you
<clever> Miyu-chan: when it regenerates the key, it will be removing the special `NixOps auto-generated key` string, there is also a fixme in here
<clever> joepie91: yes
<clever> joepie91: it then gets shoved into the user_data, and the machine boots with that
<clever> joepie91: yes, that is the hostkey
<clever> then copy the new public down
<clever> so the first time nixops ssh's into the machine, it will delete the keypair it just installed, and regenerate it
<clever> but that private is potentially leaked
<clever> nixops will create a keypair locally, and put the private into the metadata when spawning a machine
<clever> or it could be that the default key type for the server has changed
<clever> cinimod: i think you want to fix the pkgs.blas package, to include a blas.pc file
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ ls -l result/lib/
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ nix-build -A blas
<clever> there is no blas.pc in the blas package
<clever> Package blas was not found in the pkg-config search path.
<clever> [nix-shell:~/apps/nixpkgs-master]$ pkg-config --print-errors blas
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ nix-shell -p blas pkgconfig -I nixpkgs=.
<clever> cinimod: it already has it
<clever> 40232 libraryPkgconfigDepends = [ blas ];
<clever> 40223 "blas-ffi" = callPackage
<clever> [clever@amd-nixos:~/apps/nixpkgs-master]$ vi pkgs/development/haskell-modules/hackage-packages.nix
<clever> yeah
<clever> cinimod: sounds like blas just needs to be added to the system depends
<clever> '
<clever> cinimod: --arg config '{ allowBroken = true; }
<clever> cinimod: clone the rev of nixpkgs that is failing, and then `nix-build -A haskellPackages.blas-ffi`
<clever> cinimod: open a nix-shell on that drv file, and then run `pkg-config --print-errors blas`
<clever> either there, or sooner
<clever> immae: this is where it will get the env vars and put them into a map, it will need to somehow query the remote process
<clever> immae: it should be possible
<clever> to make sure one of those env vars has been set
<clever> ah, then youll need to modify whatever is running nix-daemon
<clever> but, this also reveals, settings meant for exactly this purpose
<clever> immae: systemd.services.nix-daemon.environment.FOO = "bar"; will set FOO=bar within nix-daemon's service
<clever> immae: one min
<clever> immae: correct, nix-daemon will read those env vars from its own env
<clever> which you can then use to control what that curl does
<clever> these are special env vars, that nix will allow to leak into the sandbox
<clever> its curl, inside a sandbox
<clever> thats happening within a derivation, so its not really nix doing the download
<clever> can you pastebin the full output?
<clever> what is actually failing?
<clever> pkgs.fetchurl is a normal derivation, that runs curl, inside a builder
<clever> correct
<clever> download.cc, i think is used by binary cache api's
<clever> fetchurl.cc is only for builtins.fetchurl
<clever> immae: how do you know the file isnt accessed?
<clever> not sure what else to check
<clever> immae: you may also need to restart nix-daemon when changing the file
<clever> immae: what does `nix show-config | grep netrc` say?
<clever> asymmetric: depends on if upstream changes something in that area of the code
<clever> asymmetric: i prefer patches, since they will fail correctly, rather then silently being undone
<clever> so that game was using about 40% of the GPU
<clever> tilpner: wooo, the desktop gets 1500 mpixels/sec when a game isnt going
<clever> tilpner: mesa debug flags are next
<clever> while the laptop gets ~280mpixels/sec
<clever> 700 fps, and ~700 mpixels/sec on the desktop
<clever> whoa yeah, that did it
<clever> ah
<clever> tilpner: that does in the cli args? it seems to have no effect here
<clever> same as glxgears, 300 fps is a sign of a problem
<clever> i think the vsync is throttling it
<clever> exact same performance on the laptop, with integrated graphics
<clever> getting 60 fps and ~67 mpixel/sec, with a 2d game also running
<clever> ` nix run nixpkgs.virtualgl --command glxspheres64` works here
<clever> virtualgl.out 0 s /nix/store/j7xql3qsrp1gzdd1msz97bvp9ch4j4pc-virtualgl-2.5.1/bin/glxspheres64
<clever> thats a new one
<clever> virtualglLib.out 37,888 x /nix/store/ikijswyn692h7i10j3lwhqzj6r0q5aad-virtualgl-lib-2.5.1/bin/glxspheres64
<clever> Ariakenom: i also prefer testing builds with nix-build, not nix-env
<clever> Ariakenom: nix-env -e operates entirely on the names from `nix-env -q`
<clever> Ariakenom: nope
<clever> Ariakenom: nix-env -e skypeforlinux to remove it
<clever> Ariakenom: oops, yeah
<clever> Aleksejs: how did you add it?
<clever> Aleksejs: is libuuid being added to the rpath?
<clever> thats better
<clever> why is libuuid in lythe??
<clever> ,locate libuuid
<clever> Aleksejs: you need to logout and login again for the group change to apply
<clever> lol
<clever> 2 n's
<clever> Aleksejs: oops, with 1 n's
<clever> Aleksejs: `grep scanner /etc/group` ?
<clever> Aleksejs: when you run `id`, are you listed under those groups?
<clever> cinimod: when you build with nix
<clever> cinimod: what exactly is the error?
<clever> cinimod: gcc is in the nix-shell by default
<clever> ,locate quadmath
<clever> that will generate a Makefile from the Makefile.am
<clever> craige: add autoreconfHook to nativeBuildInputs
<clever> craige: and is the sha256 correct?
<clever> craige: ls -lh /nix/store/y4ygycdy4dwy721smzchin696vdv3ka8-hello
<clever> you can read each of those types, to see what its merge function will do
<clever> attrs will: merge = loc: foldl' (res: def: mergeAttrs res def.value) {};
<clever> lines, commas, and envVar will join them with \n , or :
<clever> which deals with merging multiple definitions together
<clever> iqubic: every type has a merge function on it
<clever> and thats where it gets complicated
<clever> the modules system then treats that specially, as it merges things
<clever> iqubic: when you do foo = mkBefore "bar";, its actually doing foo = { _type = "order"; priority = 500; content = "bar"; };
<clever> yep
<clever> yep
<clever> but you can set it to a single line of text, with "foo"
<clever> that means that if you set it in multiple places, it will join the strings with \n
<clever> iqubic: it will keep it as multiple lines
<clever> yep
<clever> yeah
<clever> second answer, about logind.conf
<clever> iqubic: its a systemd option
<clever> iqubic: you can still install it with nix-env, and it should still work
<clever> iqubic: xfce4-mime-settings
<clever> when true, passwd will stick and persist
<clever> the default is true
<clever> if `users.mutableUsers = false;` then it will take effect at every boot
<clever> jackdk: but if mutableusers is turned off, it will undo that
<clever> jackdk: you should be able to use passwd under nixos-enter to change it
<clever> jackdk: is boot.loader.grub.device set correctly?
<clever> jackdk: is /boot also mounted correctly?
<clever> jackdk: maybe `--option sandbox false` ?
<clever> try re-entering nixos-enter, without the extra bind mounts?
<clever> jackdk: try again
<clever> woot
<clever> fix that and then try again
<clever> how do the contents differ?
<clever> does /etc/resolv.conf exist in the chroot?
<clever> then its a dns problem
<clever> what about `ping 8.8.8.8` ?
<clever> jackdk: can you ping an ip?
<clever> jackdk: nixos-enter will bind-mount things for you
<clever> jackdk: switch will always fail, you want `nixos-rebuild boot`
<clever> only roots nix.conf file is trusted, so your nix.conf cant affect things
<clever> freeman42y: the example i linked shows exactly what has to be set
<clever> freeman42y: you have to add it to the trusted or normal substituter list in nix.conf
<clever> not sure how to force it on the server
<clever> e
<clever> but thats chosen on the client sid
<clever> lambda-11235: vers=3 in the mount options i believe

2019-08-22

<clever> duckfullstop: i was working on a fix, then got distracted, i'll have another look at it
<clever> srhb: i think the problem only happens with impure builds
<clever> Ariakenom: i just set it in xfce display settings
<clever> :D
<clever> evil joy, lol
<clever> jollyjester: run VirtualBox
<clever> ashkitten: nix-build -A systemd --arg config '{}' --arg overlays '[]'

2019-08-21

<clever> matthuszagh: if your only testing a package, nix-build is enough
<clever> matthuszagh: use -I nixpkgs= to change which nixpkgs is being used
<clever> matthuszagh: but with the test-hydra-locally.nix i linked above, you can forward ssh, and then just use ssh normally
<clever> matthuszagh: ive not done it with qemu
<clever> you can also configure port forwarding
<clever> mingetty.autologinUser = "root";
<clever> matthuszagh: you can also set this, so it wont ask for a pw
<clever> services = {
<clever> if you booted it before, then its no longer the initial bootup, and it will persist whatever you set with passwd
<clever> matthuszagh: you need to delete the nixos.qcow2 file in the current dir, so it recreates root, and obeys initialPassword
<clever> matthuszagh: what type of vm is it?
<clever> matthuszagh: initialPassword only works on the first creation of the user
<clever> > "${./.}"
<clever> > toString ./.
<clever> also, toString, and "${ behave differently
<clever> if its for nix-shell, make a new derivation, that has both python.withPackages and the non-python stuff, in the buildInputs
<clever> but the dpkg database was lost, so it was imposible to update anything
<clever> the root disk survived, and the machine could still boot
<clever> because i abused pvmove too much
<clever> the main LV, was split into 24 fragments, scattered over 3 PV's
<clever> funnily enough, i still have a printout of the lvm metadata, on paper
<clever> gchristensen: for extra fun, it was one drive out of 4 in an lvm array
<clever> gchristensen: cascading failures!
<clever> gchristensen: which pushed the aging hdd over the edge
<clever> gchristensen: linux treated that as holding the break signal, constantly, and spammed the error logs
<clever> gchristensen: when it failed hard, it left the power led dimly lit, and pulled the serial port lines low
<clever> gchristensen: the windows machine was tied to the serial console on the linux machine
<clever> the windows machine eventually died a painful death, it took out its own motherboard, power supply, and the hard-disk of a neighboring linux box!
<clever> my setup was weird
<clever> but funnily enough, the mirc script was using tcp to talk to a daemon on linux to trigger the beep