2019-03-17

<clever> yep, my laptop is missing EGL.so
<clever> 00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
<clever> the contents will depend on which gpu drivers you have
<clever> mine happens to come from libGL
<clever> lrwxrwxrwx 1 root root 69 Dec 31 1969 /run/opengl-driver/lib/libEGL.so -> /nix/store/2yni0rxjcdsl56by9y7m73q2kp9krzv1-libGL-1.0.0/lib/libEGL.so
<clever> dramforever: are other files present in that dir?
<clever> dramforever: nixos puts that into LD_LIBRARY_PATH automatically
<clever> /run/opengl-driver/lib/libEGL.so

2019-03-16

<clever> kk
<clever> andrewrk: can you pastebin your configuration.nix file?
<clever> which simulates the old textmode console, at a higher resolution, but its not full-on graphics
<clever> ah, thats more to do with the framebuffer and fbcon stuff
<clever> andrewrk: that disables powersaving on the monitor
<clever> andrewrk: ah, no text-login at all?
<clever> andrewrk: you want auto-login?
<clever> oops, and its a desktopManager, not a window manager
<clever> justanotheruser: or select another WM at the login screen
<clever> justanotheruser: xterm is enabled by default, you need to windowManager.xterm.enable = false;
<clever> [clever@amd-nixos:~/iohk/daedalus-1195]$ nix-store -r -vvvv /nix/store/mzs612q5h655vxwzclqpah0p2r1pkz9l-daedalus.drv
<clever> by evaling the nix on its own, i can then build it with -vvv, and get less spam in the debug
<clever> [clever@amd-nixos:~/iohk/daedalus-1195]$ nix-instantiate release.nix -A staging.daedalus -I cardano-sl=/home/clever/iohk/cardano-bittrex/ -Q
<clever> samueldr: ^^
<clever> delroth: very first thing i asked
<clever> yeah, i think line 26 does that
<clever> yet i'm not doing that, and it works for me ....
<clever> delroth: this source implies that it will only use the ssh-key if you use ssh://nixbld@my.build.host
<clever> delroth: you should see this msg, if you build with -vvvv
<clever> debug("considering building on remote machine '%s'", m.storeUri);
<clever> delroth: here is where it parses /etc/nix/machines
<clever> delroth: everything looks perfect so far
<clever> the nix.conf parsing area, where that default value came from
<clever> checking some source...
<clever> yep, identical to what i have
<clever> delroth: what about `nix show-config | grep builders` ?
<clever> yeah, that looks like it should just work
<clever> delroth: can you pastebin the contents of /etc/nix/machines ?
<clever> delroth: what nix-build command are you using to initiate the build?
<clever> HatesLongFiles: i dont think systemd-boot allows custom boot entries, you would need to switch to grub
<clever> delroth: have you tried restarting the nix-daemon.service in systemd?
<clever> HatesLongFiles: what are you trying to add the entry to?
<clever> HatesLongFiles: thats how you add entries to the grub config
<clever> HatesLongFiles: https://gist.github.com/cleverca22/608734bace80d1ebf0b1403b32fc3c97 lines 17-24 insert some custom config into the generated grub config file
<clever> Avaq: they should also be in the nix or nixpkgs docs
<clever> Avaq: and this is the c++ code behind all the primops, https://github.com/NixOS/nix/blob/master/src/libexpr/primops.cc#L2160
<clever> Avaq: run `nix repl` and then hit tab a couple times
<clever> linarcx: in general, i prefer `type` over `which`, since `type` can detect functions and aliases
<clever> Avaq: you can also put the string into a file, and then just replace -E expr, with the filename
<clever> $ nix-instantiate --eval -E '{ yes = "it is"; }.yes'
<clever> "it is"
<clever> Avaq: `nix eval` or `nix-instantiate --eval`, and `nix repl`
<clever> samueldr: already packaged
<clever> therealwaphire[m: you would either need to put the driver onto a fat32 fs, or modify the firmware
<clever> nimblepoultry: dont quote the path
<clever> it uses the version of the python you start with
<clever> > python
<clever> buildInputs = with pkgs; [ zlib (python.withPackages (p: with p; [ scipi numpy ... ])) ];
<clever> justanotheruser: and the withPackages call itself, must be in the buildInputs LIST
<clever> justanotheruser: only python packages can be inside the withPackages call
<clever> justanotheruser: and with the changes?
<clever> justanotheruser: can you pastebin the code your using?
<clever> haslersn[m]: nix-build can only look in channels if the channels happen to be in NIX_PATH
<clever> haslersn[m]: that would be an empty nix-env profile

2019-03-15

<clever> but you may need to logout and login for some env vars to update
<clever> Fare: when you nixos-rebuild, it updates /etc/static
<clever> noonien: nix repl '<nixos/nixos>'
<clever> elvishjerricco: this also works
<clever> 1zmk00s48s627lxz1qd280dv4p8vihgjp926qynsa7vd4wf00kj8
<clever> echo -n nix-output:bogus | nix-hash --type sha256 --base32 --flat /dev/stdin
<clever> hadnt seen `nix to-base32` before
<clever> let me play with it a bit more...
<clever> hmmm, --flat isnt actually needed
<clever> 1zmk00s48s627lxz1qd280dv4p8vihgjp926qynsa7vd4wf00kj8
<clever> [clever@system76:~/nixpkgs]$ nix-hash --type sha256 --to-base32 --flat 484e001c276d1fa5adc746a42b1f8c1b5db21b40a2e1f03b3dc268443400b3fe
<clever> [clever@system76:~/nixpkgs]$ echo -n nix-output:bogus | sha256sum
<clever> 484e001c276d1fa5adc746a42b1f8c1b5db21b40a2e1f03b3dc268443400b3fe -
<clever> elvishjerricco: --flat
<clever> dont think so
<clever> elvishjerricco: there is more magic elsewhere, that will search for that magic string, and sub in the real $out
<clever> simukis: builtins.placeholder
<clever> then it just magically fixes everything, any time c2hs is in the buildInputs
<clever> hakujin: but once its working, you can properly add it to the c2hs package
<clever> hakujin: for testing, you can make a new derivation with only the setup hook
<clever> hakujin: this one is much simpler, and adds every buildInput to the pkgconfig search path
<clever> hakujin: this one for example, will add every buildInput to the cmake search path, i think
<clever> basically, if any derivation has a $out/nix-support/setup-hook file, the stdenv will soure it, before processing buildInputs
<clever> but a setup hook may be simpler/nicer
<clever> yeah
<clever> make a c2hs wrapper or setup-hook, to fix things
<clever> but c2hs likely hasnt
<clever> and gcc has been modified to obey that
<clever> hakujin: oh right, nix uses NIX_CFLAGS_COMPILE to make buildInputs work
<clever> hakujin: can you pastebin the version with buildInputs?
<clever> hakujin: all attributes of the derivation are also env vars
<clever> ddellacosta: you can put that entire -E string into a shell.nix
<clever> ddellacosta: this would provide cabal-install as well
<clever> nix-shell -E 'with import <nixpkgs>{}; (haskellPackages.callCabal2nix "foo" ./. {}).env.overrideAttrs (drv: { buildInputs = drv.buildInputs ++ [ haskellPackages.cabal-install ]; })'
<clever> ddellacosta: Setup.hs (by default) just calls the main function in cabal, so once compiled, its identical to the cabal binary
<clever> infinisil: and thats not in the .env by default
<clever> ddellacosta: nix currently doesnt provide a cabal binary, only a Cabal library, so you want to compile Setup.hs in that shell
<clever> ddellacosta: if you have a foo.cabal, then this is all you need
<clever> nix-shell -E 'with import <nixpkgs>{}; (haskellPackages.callCabal2nix "foo" ./. {}).env'
<clever> behind the scenes, the .env on every haskell package, is calling shellFor
<clever> > haskellPackages.shellFor
<clever> if that is written within a nixos module, it can refer to the nixos args
<clever> nixpkgs.overlays = [ (super: self: { foo = unstable.foo; }) ];
<clever> or, define the overlay itself within nixos modules
<clever> noonien: and then you have a pkgs.unstable
<clever> noonien: you would need to instead make an overlay for nixpkgs, that sets unstable=
<clever> ive not really bothered changing that
<clever> thomashoneyman: yeah, somewhere in the window manager, you would select the default font for the ui, i think
<clever> thomashoneyman: https://nixos.org/nixos/options.html#fonts.fonts
<clever> then your shell.nix can be much simpler
<clever> hakujin: i would modify default.nix to return a set, with both the haskell and libical
<clever> hakujin: .env is limited to haskell based packages
<clever> .env has some bugs like that
<clever> hakujin: so the .env needs its own override, with .env.overrideAttrs (drv: { ... })
<clever> hakujin: the .env doesnt have any of the buildInputs you overrode
<clever> hakujin: can you pastebin the nix files and the error msg?

2019-03-14

<clever> 188 export PATH="$HOME/bin:$PATH"
<clever> 187 # ~/bin if it exists overrides other bin directories.
<clever> nixos/modules/config/shells-environment.nix: # ~/bin if it exists overrides other bin directories.
<clever> infinisil: right at the very start
<clever> $ echo $PATH
<clever> /home/clever/bin:/run/wrappers/bin:/home/clever/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/clever/bin
<clever> growpotkin: nixos puts ~/bin/ on PATH automatically
<clever> or is the bootstrap curl even lacking ssl?
<clever> doesnt fetchurl also just disable ssl cert checking, and trust all certs blindly?
<clever> then `import <nixos-unstabke>` will give you the new feature
<clever> you need `sudo nix-channel --update` to update the other channels
<clever> and nixos-rebuild --upgrade, only updates the nixos channel
<clever> boogiewoogie: so by default, it will be using 18.09, which doesnt have that change
<clever> boogiewoogie: sudo nix-channel --list
<clever> infinisil: dang!
<clever> scientist: its a nixos option, that goes into configuration.nix
<clever> i use that all the time, so you can easily mutate a set of packages i'm creating
<clever> noonien: https://github.com/cleverca22/nix-tests/blob/master/kexec/simple-test.nix#L48 this is a simple example of how to create something with an overrideScope
<clever> but not for overrideScope'
<clever> i believe mine is correct, for overrideScope
<clever> noonien: notice that super and self are swapped
<clever> noonien: yeah, its been renamed since i last looked at it, and i keep forgetting
<clever> noonien: so you want gnome3 = super.gnome3.overrideScope (gsuper: gself: { vte-ng = gsuper.vte-ng ...; });
<clever> noonien: gnome3.overrideScope exists
<clever> noonien: checking...
<clever> scientist: i dont think i could use a machine where modifiers are sticky, i'm just too used to them being non-sticky, and i dont have to hold them much
<clever> scientist: https://wiki.archlinux.org/index.php/Xorg/Keyboard_configuration also mentions a `grp:alt_shift_toggle`, and toggle sounds like it could also be sticky!
<clever> scientist: https://www.x.org/releases/current/doc/man/man4/kbd.4.xhtml says that XkbOptions can be comma seperated
<clever> scientist: and behind the scenes, the xkbOptions flag lands in xorg.conf, under this field
<clever> /nix/store/0632bl75ydymsx5ivx8k204b9aagw40w-etc-unnamed-12.1: Option "XkbOptions" "caps:shiftlock"
<clever> scientist: that file i just pasted, does the remapping, similiar to your pastebin
<clever> share/X11/xkb/symbols/ctrl:xkb_symbols "swapcaps" {
<clever> scientist: it should be as simple as xkbOptions = "ctrl:swapcaps";
<clever> scientist: an xkbOptions exists to swap ctrl and capslock
<clever> share/X11/xkb/rules/base.lst: ctrl:swapcaps Swap Ctrl and Caps Lock
<clever> scientist: i dont see sticky anywhere in that derivation
<clever> /nix/store/9x7cilwdr3x0xjm624xkcnzjwbfnlhjz-xkeyboard-config-2.24/share/X11/xkb/rules/evdev.xml: <name>caps:shiftlock</name>
<clever> scientist: there it is, you can read your xkeyboard-config files, to file all xkb options
<clever> /nix/store/9x7cilwdr3x0xjm624xkcnzjwbfnlhjz-xkeyboard-config-2.24/share/X11/xkb/rules/base: caps:shiftlock = +capslock(shiftlock)
<clever> [root@amd-nixos:~]$ grep -r --color shiftlock $(nix-store -qR /run/current-system | grep xkeyboard)
<clever> which file did i find that in...
<clever> scientist: on my end, i set this, after poking around with some things: xkbOptions = "caps:shiftlock";
<clever> noonien: can you add the nix file that is actually installing termite, to the gist
<clever> ehhh, its in the binary cache, so it doesnt really matter
<clever> noonien: what configure flags do you see?
<clever> noonien: then nix-store -l /nix/store/avsg46y3lpw0xcr8wlsj3chlhqv920lk-vte-ng-0.50.2.a
<clever> noonien: what storepath does this give?
<clever> noonien: nix-store -qR $(realpath $(which termiate)) | grep vte-ng
<clever> NickSeagull: with what error?
<clever> noonien: can you put all involved files into a gist?
<clever> > vte-ng.meta.position
<clever> > vte-ng
<clever> noonien: that should be working
<clever> and how is termite then being installed?
<clever> noonien: in a nixos config file, you must set overlays like: nixpkgs.overlays = [ (import ./overlays/qemu) ];
<clever> they just do nothing when in imports
<clever> noonien: overlays cant be loaded with the imports list
<clever> just the file that is importing the above one
<clever> noonien: and then pastebin the configuration.nix as well
<clever> noonien: first, remove the rec from your attrset, that tends to just cause more problems in overlays
<clever> can you pastebin your changes?
<clever> thats the whole point of overlays, to automatically feed it to everything
<clever> noonien: and if you did an overlay against vte-ng, you dont have to touch termite-unwrapped either
<clever> noonien: an overlay will mutate pkgs.termite-unwrapped, so you dont have to override termite itself
<clever> noonien: so you want an override against termite-unwrapped
<clever> 19672 termite = callPackage ../applications/misc/termite/wrapper.nix { termite = termite-unwrapped; };
<clever> 19670 termite-unwrapped = callPackage ../applications/misc/termite { };
<clever> overrideAttrs wont help in this case
<clever> its default.nix, that accepts vte-ng
<clever> wrapper.nix doesnt accept vte-ng
<clever> 1 { makeWrapper, wrapGAppsHook, symlinkJoin, configFile ? null, termite }:
<clever> noonien: and if you read termite/wrapper.nix, what arguments does it accept?
<clever> noonien: .override
<clever> romildo: in the case of fetchzip, you can also nix-prefetch-url --unpack
<clever> glasserc: yep
<clever> sm: rather then having to type out the full package name, then 4-5 characters of the hash
<clever> sm: you can uniquely identify almost any storepath with just the first 4-5 characters of the hash
<clever> infinisil: for random nixos services, i dont bother
<clever> infinisil: though i only do that for users i have a shell as, and that own a lot of files
<clever> infinisil: also, it makes things simpler when your doing recovery, and mounting disks in the "wrong" system
<clever> infinisil: i'm used to the days when that didnt exist :P
<clever> infinisil: i staticly assign uids, so they have the same uid on every box, and then nfs is simpler to manage
<clever> sm: hydra uploads the logs to cache.nixos.org
<clever> DigitalKiwi: if you try to nix-build the same thing in 2 windows, one will build, and the other will wait on a lock
<clever> DigitalKiwi: are you building similar things in multiple windows?

2019-03-13

<clever> i could easily upload every file i have read access to
<clever> infinisil: IFD + /etc/shadow in an expression?
<clever> noonien: looks like #nixos-dev is already looking into your qemu problems
<clever> ajs124: there are some performance issues in the eval of nixos
<clever> noonien: and then this, to see all snapshots on that
<clever> [root@amd-nixos:~]$ zfs list -t snapshot -r -o name,used,refer,written amd/dedup ; df -h /home/clever/
<clever> noonien: i mainly use the above cmd, to find the biggest USEDSNAP
<clever> noonien: it might be snapshots that affect one
<clever> noonien: i think they are blurred into eachother
<clever> noonien: i'm not sure which one is dedup and which is from gzip
<clever> noonien: one entry for every single block, even if its got no dups
<clever> but maintaining and searching that hashtable, is ram-expensive
<clever> noonien: and if 2 blocks have the same hash, it reuses the block on-disk
<clever> noonien: it just blindly hashes every block, and then updates a hashmap from hash->block
<clever> avn: 2.47x ratio
<clever> amd/dedup 32.1G 27.1G 50.2G 45.5G 382M 5.03G 27.1G 2.47x 2.35x gzip-9
<clever> NAME USED REFER LUSED LREFER WRITTEN USEDSNAP USEDDS REFRATIO RATIO COMPRESS
<clever> [root@amd-nixos:~]$ zfs list -t filesystem -o name,used,referenced,logicalused,logicalreferenced,written,usedbysnapshots,usedbydataset,refcompressratio,compressratio,compression
<clever> avn: i only have dedup enabled for a dataset where i store duplicate copies of blockchains
<clever> noonien: same
<clever> newhoggy: 
you need a newer nixpkgs i believe
<clever> sm: it likely depends on ghc itself, which is massive
<clever> noonien: 32gig of ram on my laptop&desktop
<clever> noonien: ah, zfs usage doesnt show up in a lot of utils, but it will shrink on its own when needed, as long as you dont try to get too much at once
<clever> noonien: i also have zfs on this end, and none of your issues
<clever> ajs124: often times, the first eval is fairly slow, as it builds up all of the .drv files
<clever> ajs124: what does `strace -p 25975` show?
<clever> ajs124: can you pastebin the output of `ps -eH x` ?
<clever> ajs124: import from derivation
<clever> ajs124: IFD results in hydra having to build a lot of things just to eval, and it cant give status when doing so
<clever> ajs124: are you doing any IFD?
<clever> ajs124: are the hydra-eval-jobs processes using a lot of cpu?
<clever> noonien: yeah, all args to the bash script get forwarded to qemu
<clever> noonien: kvm, but i believe you already have it
<clever> noonien: that is a very weird issue, but i cant see anything obvious
<clever> ,cache sm
<clever> noonien: yep
<clever> ajs124: what does the journal for hydra-evaluator say?
<clever> ajs124: is there a hydra-eval-jobs process running for it?
<clever> though is o+r, so it shouldnt matter
<clever> noonien: cat /proc/<pid>/status on the host, with qemu's pid, then look at the uid: and gid:, what does it say?
<clever> noonien: so qemu on the host is failing to open the init file, and forwarding the error down to the guest
<clever> noonien: find the pid of qemu, and try doing `strace -p <pid> -ff -e open,openat` from a second terminal, then try to cat init from inside it
<clever> noonien: looks fairly normal
<clever> noonien: what about the host /proc/mounts ?
<clever> noonien: boots normally here
<clever> thats more how i'm trying to reproduce your issue, your already on that rev, so it wont make much of a difference
<clever> this should build a vm, with a totally empty config file, from the same rev
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ nix-build nixos -A vm --arg configuration '{}'
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ git checkout 37694c8cc0e
<clever> noonien: what nixpkgs rev are you on?
<clever> noonien: how is /nix/store setup on the host?
<clever> /etc/passwd is missing, so it cant translate 0 -> root
<clever> noonien: thats uid 0 group 0, size 5127 bytes
<clever> noonien: and what about the contents of /proc/mounts ?
<clever> noonien: you want /mnt-root/nix/store/
<clever> noonien: boot.debug1mounts is what you want
<clever> noonien: oh, debug1devices is too early
<clever> noonien: then you can get an interactive shell in stage1, and ls the file again from inside the guest
<clever> noonien: same here, you want -append "boot.debug1devices console=ttyS0" -nographic
<clever> noonien: try -append boot.debug1devices -nographic
<clever> noonien: looks like something is breaking with the 9plan stuff to mount /nix/store into the guest
<clever> noonien: switch_root: can't execute '/nix/store/yp1zk95186rqcvnnp3xl6lgbnvg00bnd-nixos-system-nomad-18.09.2327.37694c8cc0e/init': Operation not permitted
<clever> noonien: there should be more error above that, try running it with -nographics i think it was
<clever> noonien: can you screenshot or pastebin the kernel panic?
<clever> global access, thats not it
<clever> noonien: what does `ls -lh /dev/kvm` report?
<clever> noonien: yeah, that will also build a vm, but it may also need a -I nixos-config= if you want to change the cfg it uses
<clever> noonien: nixos-rebuild build-vm -I nixos-config=foo.nix
<clever> azazel: ahh, i was trying to remember what that domain was
<clever> alj[m]: all of this gets built when you nixos-rebuild the laptop
<clever> alj[m]: the tftp is just so the firmware can download ipxe when booting
<clever> noonien: then i search that eval for netboot, and find https://hydra.nixos.org/build/90298463
<clever> alj[m]: and then it uses nix to build the pxe images that it hosts on nginx!
<clever> alj[m]: and the dhcp server includes pxe support, which fetches files from the tftp and nginx the module also configures
<clever> alj[m]: it sets up NAT, so the ethernet can leech off your wifi
<clever> alj[m]: that module sets up dhcp and dns, so the ethernet port can get an ip
<clever> alj[m]: yep
<clever> noonien: that leads me to https://hydra.nixos.org/eval/1508731, which is the last eval that passed testing
<clever> noonien: i start here, https://nixos.org/channels/nixos-18.09 then open the src-url
<clever> noonien: non-graphical, and that would greatly increase the memory usage of it
<clever> pie___: thats what callPackage is for
<clever> pie___: add --show-trace to nix repl, with the same args i gave before
<clever> noonien: plug any machine into the ethernet port, and infect away!
<clever> noonien: 3 will take the same basic nix expressions, and then mutate your laptop to behave more like a router, with full pxe booting configured