2017-06-29

<clever> Fare: systemd-resolved isnt running on my machine
<clever> ah
<clever> manveru: it boots!
<clever> but ive not actually used it yet
<clever> Infinisil: i would expect it to work
<clever> manveru: strange, its not loading virtio_blk
<clever> manveru: strange, /dev/vda isnt the squashfs anymore...
<clever> manveru: yep, its broken on this end
<clever> manveru: i have recently done some changes to make the store r/w, and that might not have been fully tested
<clever> testing it on this end
<clever> yep
<clever> manveru: line 5 of the paste
<clever> manveru: looks like it failed to mount the nix store
<clever> manveru: looking...
<clever> noobly: i just read any source i can to find out how things work
<clever> noobly: correct
<clever> noobly: yeah
<clever> noobly: that goes into /etc/nixos/ and then i do imports = [ ./vim.nix ];
<clever> noobly: and then 36 puts that into the systemPackages
<clever> noobly: all of that gets baked into a bash script called "vim" that is contained in the myVim derivation
<clever> noobly: line 29 does the main plugins, 24 configures a vundle plugin, and 8-22 do the rest of my config
<clever> mellowmaroon: nix-build '<nixpkgs>' -A rustStable.rustc -o rustc-stable-root
<clever> noobly: yeah, opening that config now
<clever> noobly: i have them working just fine
<clever> gchristensen: yeah
<clever> mellowmaroon: you may need to pass it '<nixpkgs>' and setup the overlay in your ~/.config/nixpkgs/config.nix
<clever> ive heard that the macs have crazy power saving features, and that linux has worse battery life on the same hardware
<clever> like, back when i was still getting into linux old, lol
<clever> thats pretty old though
<clever> so in the event of failure, it will re-build whatever just failed, without -Q
<clever> Infinisil: i also just wrote this, because -Q hides the errors
<clever> nix-build -A cardano-sl --no-build-output --keep-going || nix-build -A cardano-sl -j 1 ;
<clever> so the docs are wrong
<clever> and the source says that the verbosity defaults to lvlError, which is 0
<clever> Infinisil: the curl's are ran in the sandbox as normal builds, and -Q is the only way i know of to hide them
<clever> Infinisil: this is another handy trick, i can override config.nix on the fly, temporarily
<clever> $ nix-build -A sage '<nixpkgs>' --arg config '{allowBroken=true;}'
<clever> ah, slightly different variant of that issue
<clever> noobly: nix-env -iA nixos.sage
<clever> Infinisil: line 8 has the enum, at level 0, errors can still be seen
<clever> Infinisil: a random debug msg, and how the debug macro works
<clever> /home/clever/nix/src/libutil/logging.hh:#define debug(args...) printMsg(lvlDebug, args)
<clever> /home/clever/nix/src/libstore/gc.cc: debug(format("downgrading to read lock on ‘%1%’") % state->fnTempRoots);
<clever> yeah, just noticed that
<clever> let me check the sources
<clever> oh
<clever> so just none
<clever> i think it defaults to 0
<clever> but both work
<clever> oh oops, meant to say --query --tree
<clever> and -qR
<clever> i usually nix-store --query --roots and --query --graph
<clever> so nix has to provide that "feature"
<clever> yeah, people will expect things they install as root to be available to everybody
<clever> and we already confirmed, only systemPackages was at play
<clever> 2017-06-28 20:32:35 < mellowmaroon> clever: `which rustc` gives => /run/current-system/sw/bin/rustc
<clever> the priority order is the users profile, roots profile, then configuration.nix

2017-06-28

<clever> Infinisil: everything managed by nix-env as root
<clever> mellowmaroon: its better to just GC less, and use nix-shell everywhere
<clever> mellowmaroon: the issue, is that each project may want a different version, and now you have to rebuild the entire system to change it
<clever> GetalMear: yeah, buildPythonPackage leads to python.stdenv.mkDerivation
<clever> pkgs/top-level/python-packages.nix: buildPythonPackage = makeOverridable (callPackage ../development/interpreters/python/build-python-package.nix {
<clever> GetalMear: nearly everything in nixpkgs calls stdenv.mkDerivation
<clever> GetalMear: overrideAttrs lets you change any attribute in the derivation
<clever> mellowmaroon: without more context, i cant really see why its doing that again
<clever> and you can nix-shell -p rust.rustc to open a shell with that
<clever> as long as the rustc-root symlink remains, it cant be GC'd
<clever> nix-build -A rust.rustc -o rustc-root
<clever> not sure then
<clever> it doesnt know which rustc to use
<clever> thats because you had multiple things in systemPackages, that all provide rustc
<clever> mellowmaroon: does this mention any warnings about collisions on rustc?
<clever> $ nix-store -l /run/current-system/sw
<clever> you should only use them in nix-shell
<clever> generally, you shouldnt install compilers on nix or nixos
<clever> ah, then you may have several rustc's in the systemPackages
<clever> mellowmaroon: what about just which rustc
<clever> mellowmaroon: what does "realpath $(which rustc)" say?
<clever> nix-repl> pkgs.rustStable.rustc
<clever> «derivation /nix/store/qjpgbbpwlmrzpfr2vchd07c10z3lw5s3-rustc-1.17.0.drv»
<clever> i think so
<clever> rustNightly, rustStable, rustUnstable
<clever> the 'rust' attribute works exactly the same way in normal nixpkgs
<clever> mellowmaroon: i believe it also has a rustStable.rustc and rustStable.cargo
<clever> depends on which ones you want
<clever> it contains rust.cargo and rust.rustc
<clever> mellowmaroon: line 89 of https://pastebin.com/9KKYUbwz, rust is an attribute set
<clever> mellowmaroon: ah, i see the problem
<clever> what about the full error from --show-trace?
<clever> ah
<clever> mellowmaroon: line 18 doesnt have the fix i did to my gist
<clever> ah, didnt notice the pastebin
<clever> mellowmaroon: can you gist the entire error from --show-trace, and the code where you referenced the overlay?
<clever> mellowmaroon: edited the gist, try it now
<clever> that gist wasnt vinished
<clever> mellowmaroon: oh i see it
<clever> mellowmaroon: with imports or import?
<clever> mellowmaroon: can you gist your nix expression?
<clever> mellowmaroon: just pkgs.foo
<clever> yeah
<clever> anelson: i have a pre-build copy of wine-wow for 16.09 on https://hydra.angeldsis.com/build/682#tabs-details
<clever> mellowmaroon: already helped somebody with that about 3 days ago, let me check my irc logs
<clever> dash: :D
<clever> and i think wow is to run 16bit apps on a 32bit kernel
<clever> so confusingly, wow64, is the support layer to run 32bit apps on a 64bit kernel
<clever> In computing, Windows on Windows (commonly referred to as WOW,[1][2][3]) is a compatibility layer of 32-bit versions
<clever> this is what i was building
<clever> wine.override { wineBuild = "wineWow"; }
<clever> anelson: i also have a nix expression for building the 64bit wine, let me see
<clever> some things like .net i think, just dont work in the 64bit wine
<clever> i'm guessing its because its flagged as unstable
<clever> Infinisil: i only ever use it to do one-time conversion from svn to git, but i have seen others use it to work full-time on svn based projects
<clever> but when you push it back to the svn repo, it will rewrite the git commits to match the format used by "git svn", and also flatten the history out (no more branching and merging history)
<clever> Infinisil: you can then work locally using normal git
<clever> Infinisil: "git svn" will download every commit from an svn repo, and create a local git commit that applies the same changes
<clever> same
<clever> builtins.trace can help with figuring that out
<clever> i picked it up fairly fast
<clever> sounds like a bug in fetchurl
<clever> the nix-instantiate is trying to directly import things into the store, without asking nix-daemon to do things
<clever> ah, i think i know whats wrong
<clever> due to lazy evaluation, you have to insert it where a value is going to be used
<clever> and you can use string interpolation to print variables in that msg
<clever> ixxie: you can insert calls to trace anywhere in your expression, and nix will print the message out as it runs the code
<clever> "returnme"
<clever> nix-repl> builtins.trace "printme" "returnme"
<clever> trace: printme
<clever> ixxie: do you have another trace i can explain?
<clever> ixxie: so you can safely ignore lines 1-84 in this example
<clever> ixxie: and line 84 mentions the pkgs attribute of the system-path derivation, which is responsible for merging all of systemPackages up
<clever> ixxie: line 46 mentions the unitConfig, that eventualy lands into the service file
<clever> ixxie: line 17 makes mention of the dbus.service file
<clever> Infinisil: what about fetchTarball?
<clever> Infinisil: ah yeah, i ran into that a few days ago, dont know why fetchurl is complaining like that
<clever> yeah
<clever> ixxie: now it should work when turned back into a nixos module and used in nixos-rebuild
<clever> and pkgs.fetchurl needs a set, not a string
<clever> Infinisil: you need to pass it strings
<clever> error: cannot coerce an integer to a string, at /tmp/fetch/default.nix:3:21
<clever> so that file wont exist
<clever> ixxie: revision f2b75c2 of https://github.com/ixxie/flux lacks a nix directory
<clever> does it have the files you are expecting it to have?
<clever> ls /nix/store/9llr9h6n86kp5zs55rphwihkjijmdgk8-flux-f2b75c2/nix
<clever> does it give an error or a value?
<clever> ixxie: what values do you see in that environment.systemPackages list when you eval it in nix-repl?
<clever> ixxie: by changing just 2 lines, i can eval that module in nix-repl: https://gist.github.com/cleverca22/b1b418059f747e67ac0a69201e9f0e88
<clever> Infinisil: nix-instantiate --eval -E 'expression'
<clever> ixxie: nearly 80% of your error is because there was an invalid entry in environment.systemPackages, and only ~10 lines are actualy of use
<clever> that makes it eval faster, and puts less clutter into the errors
<clever> ixxie: first step, try building the package with nix-build, dont put it in systemPackages yet
<clever> ixxie: can you gist your code and the error?
<clever> as long as the value of items doesnt depend on the result of map, its not circular
<clever> Infinisil: import from derivation will download those things at eval time, and then import the result
<clever> Infinisil: i would instead do map (a: import (fetchzip "https://example.com/${a}")) items, and thats not fixed-output, so its impure
<clever> ixxie: and import can take strings pointing to a local path
<clever> ixxie: all derivations return a string pointing into the store
<clever> sphalerite: i think it makes an interactive shell, not a login shell
<clever> Infinisil: import (fetchzip .... ) will load the default.nix in whatever it just unpacked
<clever> Infinisil: import from derivation
<clever> srhb: this gist shows where every variable setting winds up, and how they chain together
<clever> sphalerite: "sudo -i" will just run the proper shell for whatever user you point it at, no need for messy tricks
<clever> srhb: running login probably messes up a lot of things
<clever> srhb: i always use "sudo -i" and it doesnt break xorg when giving a root shell
<clever> srhb: #1 might be vlc trying to auto-hijack a spare tty, and chvt over to it
<clever> Coyin: that is the first bullet point under "partition the disk" when it says the type must be ef02
<clever> LnL: i usualy do it with fdisk, let me see what that uses
<clever> Coyin: i think the command LnL gave with EF02 does part of that
<clever> Coyin: you must create a bios boot partition, 1mb, no filesystem, never mounted, for gpt to boot with legacy
<clever> Coyin: GPT or MBR partition tables?
<clever> c++
<clever> so i could just raise the averaging window, and it was less eager to change freq
<clever> but that was back before the kernel even had automatic freq changing, it was all driven by powernowd, which had flexible config
<clever> the hardware keyboard buffer must have been really short
<clever> and the timing was just right, that it always dropped key events when i finished reading and tried to do something
<clever> and "ls -ltrh" used enough cpu to make it want to clock up
<clever> sphalerite: with one of my old laptops, the first one with cpufreq scaling, the entire system would lock up for ~0.5 seconds every time the freq changed
<clever> sphalerite: that used to be a daily occurance for me
<clever> adisbladis: what does this one say?
<clever> # btrfs filesystem df /
<clever> adisbladis: ah, btrfs has its own problem, with the balance of metadata vs data
<clever> adisbladis: what about df -i /nix/store/

2017-06-27

<clever> default.nix also has a shortcut to it, so nix-build -A runner
<clever> runner = test1.config.system.build.runvm;
<clever> oh
<clever> manveru: oops, if you build the system.build.runvm attribute, you get a bash script that runs it under qemu
<clever> MP2E: this runs sshd, and nix-daemon: https://github.com/cleverca22/not-os/blob/master/runit.nix#L56-L69
<clever> MP2E: so you need to manualy write runit units for any service you want
<clever> so nearly every service under services.foo is non-functional
<clever> MP2E: not-os replaces the entire init system with runit, but systemd.services obviously doesnt work
<clever> yep, thats it
<clever> noobly: i have gotten a highly customized variant of nixos to compile down to ~45mb
<clever> i just sudo mount, lol
<clever> makes things so much simpler
<clever> sphalerite: yeah, i also didnt know about that until the guy running that server sent me that file
<clever> manveru: systemctl start/stop openvpn@linkname i believe
<clever> froglegstew: https://gist.github.com/cleverca22/6033beef3c659591b313267c35a849bd is what i have used in the past
<clever> check nix-env -q and read the man page for the -e flag
<clever> tommyangelo[m]: you need to uninstall the version in roots nix-env
<clever> telotortium: you installed it in both nix-env and systemPackages
<clever> hyper_ch: or i have to manualy delete the snapshots
<clever> hyper_ch: i didnt do that on some systems, and now there is a multi-month delay on any nix-collect-garbage
<clever> hyper_ch: for example, i can turn snapshots off in /nix, but leave it on in / and /home
<clever> hyper_ch: i use 3 filesystems, so /nix and /home can optionaly have different options
<clever> hyper_ch: pong
<clever> pxc: not currently planning on it
<clever> i see 62 things refering to perl on my nixos machine
<clever> at least on nixos
<clever> pxc: but perl is probably being pulled in by other things
<clever> pxc: it seems to be a mix of perl and elf
<clever> pxc: nearly every script in groff is using a perl #!
<clever> /nix/store/cjmnrbfqrdnllb4j6a6qlzbv55gqzrih-groff-1.22.3/bin/groffer:#!/nix/store/nsa311yg8h93wfaacjk16c96a98bs09f-perl-5.22.3/bin/perl
<clever> [clever@amd-nixos:~]$ grep -r --color nsa311yg8h93wfaacjk16c96a98bs09f /nix/store/cjmnrbfqrdnllb4j6a6qlzbv55gqzrih-groff-1.22.3
<clever> we need to grep the groff storepath for the perl path
<clever> so its not a mistake in the fish package
<clever> it appears to embed the path to groff into a fish script involved in printing help
<clever> every file, binary and text
<clever> more like grep
<clever> nativeBuildInputs just means it has to be from the host, not the target
<clever> all runtime stuff is based on what paths are in $out, not the nix expressions
<clever> if its in the $out of groff, its in the closure of groff
<clever> i'm guessing somebody put it in the wrong field of fish
<clever> groff is usualy involved in generating man pages
<clever> what is your storepath for fish?
<clever> this is what i tend to use
<clever> [clever@nas:~]$ du -hc --max=0 $(nix-store -qR /run/current-system) | sort -h
<clever> pxc: one min
<clever> it wont add any values into the global or local scope
<clever> the import statement will return the top-level value of the named file

2017-06-26

<clever> so you can grep the exact nixpkgs copy that your running against
<clever> which is usualy what <nixpkgs> maps to
<clever> qmake: this directory contains the nixos channel for root
<clever> $ ls ~/.nix-defexpr/channels_root/nixos/
<clever> i do see a qtx11extras attribute in some of the qtxx sets
<clever> nix-repl> qt56.qtx11extras
<clever> - wrapQtProgram $out/bin/qt5ct
<clever> qmake: it was using makeQtWrapper
<clever> -{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmake, makeQtWrapper }:
<clever> oh, interesting
<clever> c816bbc8a86 (Thomas Tuegel 2017-05-17 14:26:11 -0500 1) { stdenv, fetchurl, qtbase, qtsvg, qttools, qmake }:
<clever> qmake: i do see a related commit from ~9 days ago
<clever> 22b10bac78e pkgs/top-level/all-packages.nix (Thomas Tuegel 2017-06-17 11:26:19 -0500 9754) libsForQt59 = recurseIntoAttrs (lib.makeScope qt59.newScope mkLibsForQt5);
<clever> qmake: with this, i can point it to a copy of master
<clever> nix-build -E 'with import <nixpkgs> {}; libsForQt5.callPackage ./mvesua2m {}' -I nixpkgs=/home/clever/apps/nixpkgs/
<clever> it breaks on nixos-unstable, but it works on master
<clever> qmake: it looks like a recent redesign of the qt stuff in nixpkgs
<clever> qmake: can you gist your default.nix file?
<clever> qmake: i do see a qmake at qt59.qmake
<clever> qmake: adding things to systemPackages will never fix build errors in nix
<clever> that is strange
<clever> qmake: what other qt packages are you looking at?
<clever> qmake: it may also not need qmake in the arguments of the file
<clever> qmake: you must load it with callPackage, or possibly qt5.callPackage
<clever> nix-build -E 'with import <nixpkgs> {}; callPackage ./molotov.nix {}'
<clever> as an example of what can go wrong, if you install nixops on ubuntu 14.04, it just fails to import modules, but the exact same nixops on 12.04 works fine
<clever> noobly: i prefer baking absolute paths into everything i build, so it will work even with nix-build and ./result/bin/foo
<clever> that is how pkgs is being added
<clever> ij: and via config._modules.args, you can add any custom argument you want, which is passed to every module
<clever> and the pkgs argument comes from loading <nixpkgs> and passing it the config in config.nixpkgs.config
<clever> so every module is being passed its own return value as an argument
<clever> which is passed to all of them
<clever> ij: nixos will then inteligently merge all of the configs (and the ones lacking either) together, to create a single master config attribute
<clever> ij: the top-level value of every nixos module (including configuration.nix) will return either { options = {}; config = {}; } or just { something };
<clever> ij: yeah
<clever> and it uses this override to build a custom glibc locales package, with just the locales you selected
<clever> https://nixos.org/nixos/options.html#i18n.supportedlocales and this controls LOCALE_ARCHIVE
<clever> https://nixos.org/nixos/options.html#i18n.defa this controls LANG
<clever> ij: and if you then grab nixpkgs for that variable, you find https://github.com/NixOS/nixpkgs/blob/release-17.03/nixos/modules/config/i18n.nix#L123-L126
<clever> which is a result of merging environment.variables and a couple of others
<clever> which means they came from this variable
<clever> the 1st clue, those are in the first bank of variables
<clever> ah
<clever> ij: nvm, that exact file is in the binary cache, which exact variable are you asking about?
<clever> ij: can you give an exact example?, there are subtle clues that can reveal where it came from gist the entire set-environment file
<clever> its in the nixos side of things, so its not a normal package and the normal tools wont find it
<clever> ij: its a combination of environment.variables and environment.extraInit
<clever> ah, i have a gist on that
<clever> ij: nix-index is one method, which file are you looking for?
<clever> because they cant just make it easy :P