2019-06-27

<clever> pie_: you can also use extend instead of composeExtensions
<clever> pie_: i usually call it packages = self: { ... }
<clever> somebody stop me!
<clever> meltdown or spectre, in a nix expr......
<clever> manveru: yep, all primops like attrNames will sort by name, and hide this from you
<clever> but, it only leaks that detail in terms of the order it evals (and runs trace)
<clever> and i was able to control if the output was 12 or 21, based on what files i parsed before tracing
<clever> for example, i was running a trace method over { a=1; b=2; }
<clever> and if you are careful about parse order, you can influence the id's, and then cause impurity in the eval order
<clever> manveru: sort of, its not actually a hash, but just an index into an array of all keys
<clever> so you dont have to bother doing strcmp() against "name" 2 million times
<clever> and certain keys like "name" have the magic int held in a global variable
<clever> and it will do a one-time string->int check, and then use the int==int compare when searching the set
<clever> behind the scenes, attrsets are int->value, for fast lookups
<clever> all primops that give the contents of a set, will sort by the key strings, and hide that detail from you
<clever> but the only time you will ever see that order, is when you mapAttrs builtins.trace over the set
<clever> manveru, pie_: note, that all attrsets are sorted by a magic int behind the key, not the string of the keys themselves
<clever> m1cr0man: i think so
<clever> monokrome: it can also be a partial filename
<clever> monokrome: that searched by filename, not package name
<clever> which is similar to with, but has a whitelist, and it should fail at parse time
<clever> you can also, `let inherit (lib) mkOption; in ...`
<clever> i just dont use it
<clever> with also introduces a slight overhead in attr lookups
<clever> so the callstack and time of failure is drastically different
<clever> but this fails (with an identical message) at eval time, when the value is forced
<clever> > with { a = 42; }; shouldnotexist
<clever> > with { a = 42; } in shouldnotexist
<clever> this fails at parse time
<clever> > let a = 42; in shouldnotexist
<clever> > let a = 42; in b
<clever> another, is that it mutates errors
<clever> gchristensen: fileSystems
<clever> neither is 'foo' but that may be harder to parse
<clever> `foo` isnt used yet
<clever> pie_: i dont think so
<clever> the subdomain says ftp, but the protocol is http!
<clever> and the domain is misleading
<clever> the install cd is also weird, sshd is enabled, but not running on bootup
<clever> kraem: the installation cd or a normal install?
<clever> standard breakpad stuff, that can be auto-uploaded to valve and merged with the split debug symbols
<clever> but it did internally make its own coredump
<clever> ../common/pipes.cpp (766) : CClientPipe::BWriteAndReadResult: BWaitResult failed, disconnected
<clever> assert_20190626204219_1.dmp[24093]: file ''/tmp/dumps/assert_20190626204219_1.dmp'', upload yes: ''CrashID=bp-e4bdc89c-4dd1-4990-93fc-da53a2190626''
<clever> backtrace in coredump is useless, the frame pointers are kaput
<clever> Wed 2019-06-26 22:49:20 ADT 7511 1000 100 11 present /tmp/chrootenv5KHA4Z/home/clever/.local/share/Steam/ubuntu12_32/steam
<clever> Dandellion[m]: ive got amdgpu, but my steam has mostly been crashing after i exit a game
<clever> anttih_: nix-shell -E 'with import <nixpkgs> {}; callPackage ./foo.nix {}'

2019-06-26

<clever> `wpa_cli` will open a repl, where you can query wpa directly, with things like status
<clever> `iwconfig` will show the status of all wireless cards`
<clever> yeah, restart it, and then investigate what is broken
<clever> day|flip: check the status in `wpa_cli`, check `iwconfig`
<clever> day|flip: i would investigate what is wrong, without restarting it, to see why its broken
<clever> and i dont see any errors from either end
<clever> it started both connman and wpa_supplicant at exactly 17:17:57
<clever> day|flip: how does that compare to the timestamps in `journalctl -u connman -b 0` ?
<clever> day|flip: looks like it started normally, and was restarted a few times
<clever> day|flip: what is the actual error your seeing?
<clever> day|flip: `journalctl -u wpa_supplicant -b 0` ?
<clever> day|flip: you want to make one of the services require the other
<clever> pie_: nice
<clever> sonercirit[m]: i just read all the source
<clever> sonercirit[m]: nix-repl> lib.filter lib.isDerivation (builtins.attrValues kdeApplications)
<clever> ,callPackage noonien
<clever> sonercirit[m]: you want [ "foo" "bar" ]
<clever> sonercirit[m]: [ ... ] is an array of items
<clever> noonien: nix-build
<clever> Guest77: root is trusted by default
<clever> Guest77: if the receiving end is a trusted user, it wont check
<clever> sonercirit[m]: nix repl '<nixpkgs>'

2019-06-25

<clever> Notkea[m]: nope
<clever> Notkea[m]: you want to set the outer config, after you mapAttrs over config.yourthing.yoursubmodule
<clever> emptyflask: probably
<clever> emptyflask: if nix-daemon is running, then NIX_SSL_CERT_FILE would have to be set for the nix-daemon process
<clever> Guest25435: `journalctl -f -t kernel` will show dmesg logs
<clever> which also lands in the journal
<clever> elux: and then below that, is what depended on pyqt
<clever> slabity: did you check `systemctl status name.service` ?
<clever> elux: nixops is a tool to auto-create hardware in the cloud, and deploy nixos to it in bulk
<clever> slabity: all services must be defined in the nixops deployment files
<clever> slabity: nixops will also ignore the remote configuration.nix file
<clever> slabity: nixops will never touch configuration.nix
<clever> elux: nix gives you a stack trace when it fails, to say what depended on it
<clever> disasm: it looks like the rust code is using a different nixpkgs, so it has a diff glibc
<clever> and 2 util-linux's
<clever> but there are 2 glibc's
<clever> disasm: closure is now 72mb, and doesnt depend on pam
<clever> closure is currently 93mb, and includes util-linux and pam
<clever> [clever@amd-nixos:~/iohk/jormungandr-nix]$ du -h --max=0 -c $(nix-store -qR ./result) | sort -h
<clever> nope, sd_journal_sendv!
<clever> 36661: 0000000000000000 0 FUNC GLOBAL DEFAULT UND sd_journal_sendv@@LIBSYST
<clever> oh, it might be sd_notify
<clever> libsystemd.so.0 => /nix/store/mpz6fgvrz75lcczsdni94254jp5nmxw3-systemd-239.20190219-lib/lib/libsystemd.so.0 (0x00007f7cdd718000)
<clever> /nix/store/c8k8dl7k6hahagzzkyw501dp1548sp99-openssl-1.0.2r/lib:/nix/store/mpz6fgvrz75lcczsdni94254jp5nmxw3-systemd-239.20190219-lib/lib:/nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib
<clever> gchristensen: its in the rpath
<clever> [nix-shell:~/iohk/jormungandr-nix]$ patchelf --print-rpath /nix/store/npw1ck04ps0x497hrlwzmiqidyp8x1yr-jormungandr-0.2.3/bin/jormungandr
<clever> disasm: *cries*, we depend on systemd!! lol
<clever> again, runCommand can solve that
<clever> and we need uuidgen
<clever> gchristensen: libuuid, is actually an alias to util-linux!
<clever> > libuuid
<clever> disasm: the override fails
<clever> rm: cannot remove '/nix/store/0syviigzsncd94hypp618c0ahz2w76cc-util-linux-2.33.1-bin/bin/su': No such file or directory
<clever> nix-repl> :b utillinux.override { pam = null; }
<clever> disasm: util-linux is to blame
<clever> disasm: building jormungandr-bootstrap....
<clever> disasm: bash doesnt depend on pam
<clever> disasm: let me check the cat drv...
<clever> but it depends on glibc
<clever> lordcirth: 991kb on nixos
<clever> -r-xr-xr-x 1 root root 991K Dec 31 1969 busybox
<clever> disasm: runCommand to copy cat to /nix/store/hash-cat/bin/cat ?
<clever> Neo--: yeah, you need to logout and log back in
<clever> uid=1000(clever) gid=100(users) groups=100(users),1(wheel),72(vboxusers),131(docker),500(wireshark)
<clever> Neo--: run `id` to confirm what groups your in
<clever> but it also has regular pcie slots, so i can just ignore that
<clever> NinjaTrappeur: its a laptop sized card, mini-pci-e
<clever> NinjaTrappeur: my nas came with this on the motherboard, and the antenna has 2 coax wires, so its much more modern
<clever> 02:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)
<clever> NinjaTrappeur: http://support.dlink.ca/ProductInfo.aspx?m=DI-524 this old thing
<clever> NinjaTrappeur: the dlink router only has 100mbit ethernet ports, and the firmware is from 2005
<clever> NinjaTrappeur: https://beta.speedtest.net/result/8365544715 is what i get from my desktop, but https://beta.speedtest.net/result/8365547032 is what i get from the laptop
<clever> and ive been wanting to use hostapd on my nas to resolve that
<clever> NinjaTrappeur: ah, in my case, my wifi is coming from an aging d-link router, and its capped at ~19mbit
<clever> NinjaTrappeur: ah, i did notice hostapd is only running in g band for me right now, and wanted to get more speed out of it
<clever> Notkea[m]: you want mkMerge
<clever> infinisil: i was trying to use the compare operator, lol
<clever> Notkea[m]: or was it !=
<clever> Notkea[m]: i think you can just use the = comparison to implement xor
<clever> infinisil: oh crap....
<clever> > true = false
<clever> > true == false

2019-06-24

<clever> zacts: it just tells nix-channel to --update, so mixing with -I nixpkgs= is pointless
<clever> zacts: yeah, the --upgrade is useless
<clever> ddellacosta: why do you need your own config file?
<clever> pbb: they should just be available in the initrd, do you have an example of what your doing?
<clever> day|flip: journalctl -f -u wpa_supplicant
<clever> infinisil's thing will filter by type
<clever> sonercirit[m]: this will filter by key, so you can also exclude rider
<clever> builtins.attrValues (lib.filterAttrs (key: value: ! builtins.elem key [ "recurseForDerivations" ]) jetbrains)
<clever> sonercirit[m]: one of the entries in that set, is not a package
<clever> > jetbrains.recurseForDerivations
<clever> sonercirit[m]: may need some () to scope things right, environment.systemPackages = with pkgs; ([ wget ] ++ builtins.attrValues jetbrains);
<clever> sonercirit[m]: probably
<clever> sonercirit[m]: so you would do: environment.systemPackages = builtins.attrValues pkgs.jetbrains;
<clever> sonercirit[m]: that returns a list, containing every value in the jetbrains set
<clever> > builtins.attrValues jetbrains
<clever> sonercirit[m]: what do you want the * to do?
<clever> aanderse: that gets more messy, i would patch the cmake layer to just take a pre-built copy of the npm stuff in an env var
<clever> CloudNinja: you can then continue with the installation as normal
<clever> CloudNinja: if you run kexec_nixos like in this example, it will immediatelly boot into nixos, without any changes to the hdd
<clever> aanderse: ah, then youll want to just fetchFromGitHub a copy, like daedalus does
<clever> elux: definitely looks like you have a _latest version on one machine
<clever> aanderse: youll want to import it, via fetchFromGithub, or use the copy nixpkgs provides
<clever> master linux, 4.19.41, master linux_latest 5.1
<clever> 19.03 linux_latest is 5.1
<clever> aanderse: a yarn2nix ive used heavily, https://github.com/input-output-hk/daedalus/blob/develop/yarn2nix.nix
<clever> elux: did you set boot.kernelPackages ?
<clever> for the .linux attr
<clever> nixos-19.03 is at linux-4.19.41
<clever> elux: *looks*
<clever> while nixos-unstable gets upgrades, and potentionally deletions
<clever> elux: yeah, nixos-19.03 is the release channel, so it will only get stability and security updates
<clever> elux: what does `nix-channel --list` and `sudo nix-channel --list` report?

2019-06-23

<clever> yep
<clever> day|flip: services.udev.extraRules
<clever> day|flip: i think it goes in $out/lib/firmware, and then into hardware.firmware = []
<clever> adamantium: and that may include your root pw, if you did users.users.root.initialPassword = "hunter2";
<clever> adamantium: of note, if your sloppy and have secrets in /nix/store/, the guests can just read them
<clever> adamantium: yeah, nixos containers are based on systemd-nspawn, and it will share /nix/store/ to every guest
<clever> foo_bbar: /usr/bin/env isnt in the nix sandbox, you need to run patchShebangs
<clever> kraem: yeah, it should
<clever> kraem: yep, looks good
<clever> kraem: rest of the file looks good
<clever> kraem: oops, ^^
<clever> bgamari: it should be changed to { config = config.nixpkgs.config; }
<clever> ar: why do you think its broken?
<clever> so you will need the 2nd part
<clever> kraem: { config = config.nixpkgs.config; } (where i put inherit) tells nixos to copy the 2nd half of your question to the vinefix packages
<clever> kraem: oh, and typo on the config part
<clever> kraem: you would replace the first part with vinefixPkgs.chromium
<clever> usually between the { pkgs, ... }: and the main attrset
<clever> kraem: yeah
<clever> kraem: you can then put vinefixPkgs.chromium into your systemPackages
<clever> kraem: that will just fetch the fixed nixpkgs, and pass it your existing nixpkgs.config values (which enable widevine)
<clever> kraem: let vinefixPkgs = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/archive/e0c31611e88865cd8c0e41ef3b4fefa34b258ae8.tar.gz) { inherit config.nixpkgs.config; }; in ...
<clever> kraem: one min
<clever> kraem: oh, i think its `git fetch origin pull/60833/head`
<clever> kraem: that will put you on the same commit as the PR, so you can just `nix-build -A chromium`
<clever> kraem: clone nixpkgs, and then run `git fetch pulls/60833/head` and then `git checkout FETCH_HEAD`
<clever> mog: if you want clang, you must use clangStdenv on linux, adding clang to the inputs causes issues
<clever> Netsu: NIX_CFLAGS_COMPILE = "-I${jerasure}/include/jerasure"; in the nix file
<clever> Netsu: no .pc files present, youll need to just generate your own -I flags then
<clever> Netsu: you would need to install jerasure, and then check its lib directory
<clever> Netsu: the pc file may only exist after building the package
<clever> mog: everything looks like it should be working
<clever> mog: you forgot the `type `
<clever> mog: what does `type g++` return in that shell?
<clever> mog: you can also `make VERBOSE=1` to make cmake reveal the commands
<clever> mog: are you sure that is inside nix-shell?
<clever> Netsu: it will be a .pc file somewhere under lib
<clever> Netsu: yeah, when dealing with include/jerasure, you need to add pkg-config into the mix, does jerasure have a pkgconfig file?
<clever> same for -I flags, just put headers in $out/include/ for the thing providing the header, and then put that in buildInputs
<clever> nix will handle -L for you
<clever> Netsu: for the most part, just omit all -L flags, and put the packages in the buildInputs for the derivation
<clever> mog: it might also need something like -std=c++11 to enable c++11
<clever> mog: can you paste the full error and the cmds it was running?
<clever> mog: are you using gcc or g++ to link it?
<clever> Netsu: if you gave some example code, i can look at it
<clever> Netsu: for most packages, you can just -lfoo to link against foo, no pkgconfig needed
<clever> sonercirit[m]: or just forward the port manually
<clever> sonercirit[m]: compare the output off ldd when ran on both binaries
<clever> sonercirit[m]: the client stuff should be built into the torrent client
<clever> sonercirit[m]: on the router or client?
<clever> the nix copy stuff is mainly to deal with updating such a copy, or making partial copies
<clever> youll want to backup /nix as a whole next time
<clever> qyliss: ahhh, yeah, no real way to recover from a missing db.sqlite
<clever> qyliss: do you know much of sqlite? poke around in nix/var/nix/db/db.sqlite
<clever> qyliss: `nix path-info --store local?root=/home/qyliss` and check its help page, can you query anything from that store?
<clever> though it may been awk to add a / to that
<clever> qyliss: nix copy --from local?root=/home/qyliss nix/store/* ?
<clever> qyliss: what about just using * ?
<clever> qyliss: ahh
<clever> qyliss: find ran locally, and is listing paths you already have
<clever> not sure if --all works like that, but you can try
<clever> qyliss: nix copy --from local?root=/path/to /nix/store/foo
<clever> and swap in --from to reverse the flow
<clever> you can even copy it to /mnt on a remote machine, over ssh
<clever> nix copy --to ssh://root@target?remote-store=local?root=/mnt /nix/store/hash-nixos
<clever> but it wont get gcroots and profiles
<clever> qyliss: that will copy things from one store to another, and maintain the database as it does so
<clever> qyliss: nix copy --to local?root=/mnt /nix/store/foo or --all
<clever>
<clever> ive found most can be fixed with a dontCheck

2019-06-22

<clever> Guest20: yeah
<clever> Guest20: that can be put at any level of the config, so you could do systemd.services = mkMerge [ .... ];
<clever> Guest20: config = mkMerge [ { ... } { ... } ];
<clever> balder11: yep, so you need to also add firefox-bin to the whitelist
<clever> error: Package ‘firefox-bin-66.0.5’ in /nix/store/xcn5jx4di3fbkfgdv3bjmj3ap3p65k9z-nixos-19.09pre179307.bc94dcf5002/nixos/pkgs/applications/networking/browsers/firefox/wrapper.nix:176 has an unfree license (‘unknown’), refusing to evaluate.
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ nix-build '<nixpkgs>' -A firefox-bin --arg config '{}'
<clever> balder11: oh, *looks*
<clever> balder11: i can reproduce the problem with this
<clever> nix-build '<nixpkgs>' -A dropbox --arg config '{ allowUnfreePredicate = let whitelist = ["dropbox"]; parsePkgName = (pkg: (builtins.parseDrvName pkg.name).name); in (pkg: builtins.elem (parsePkgName pkg) whitelist); }' --arg overlays '[]'
<clever> balder11: i would expect firefox to still work though
<clever> justanotheruser: you want to be editing still.nix
<clever> > libreoffice.meta.position
<clever> justanotheruser: what about `sudo nix-instantiate --find-file nixpkgs` ?
<clever> justanotheruser: all --upgrade does, is run nix-channel --update
<clever> justanotheruser: --upgrade is pretty much pointless then and will never do anything useful
<clever> justanotheruser: and what is NIX_PATH set to?
<clever> justanotheruser: where is the file you edited?
<clever> justanotheruser: you shouldnt need --upgrade, and how did you change the configureFlags?
<clever> mpickering: i think you want `nix build -f .`
<clever> and every user has their own channels
<clever> fasd: nixos-rebuild --upgrade, will only update the channel called nixos
<clever> lurpahi: gist updated one last time, i'm off to bed, it compiles fully with nix now!
<clever> lurpahi: it compiles!
<clever> lurpahi: making progress now...
<clever> lurpahi: updated my gist again
<clever> mac10688: nix-env adds things to ~/.nix-profile, nix-shell sets up env vars, nix repl lets you eval chunks of nix
<clever> jackmaster-0.0.2/README:If you have a different CPU than athlon-xp, you have to adjust the
<clever> lurpahi: the build script inserted -march=athlon-xp
<clever> cc1: error: CPU you selected does not support x86-64 instruction set
<clever> lurpahi: oh, i see the problem its the sticky bit
<clever> the `ls -ltrh` i left in my function for debug, made it not fail
<clever> oh, interesting
<clever> and it still works, `Cannot change mode to rwxrwsrwx: Operation not permitted` is just a warning
<clever> lurpahi: heh, i just did exactly that after reading the man page for 7z
<clever> ,locate gtk-config
<clever> lurpahi: how did you try running cpio?
<clever> lurpahi: ah, i only tested cpio outside of nix so far
<clever> lurpahi: it also looks like cpio can unpack it just fine
<clever> its just an optional thing to make it cleaner
<clever> lurpahi: and if you add a bash function to the unpackCmdHooks like this, the default unpackPhase will run it to unpack things
<clever> lurpahi: which tries to run unpackCmd
<clever> lurpahi: but it would also be nice to get it integrated into unpackFile
<clever> lurpahi: the default unpackPhase did already chmod, so its not that abnormal to put it into your own
<clever> lurpahi: ah, 7z's cpio, that is a weird thing to deal with
<clever> lurpahi: can you pastebin your nix expr?
<clever> bpye: what fs is /boot/ on?
<clever> bpye: what fs is /boot/ on?
<clever> s/boot/mount/
<clever> bpye: if its configured to not boot that dataset via fileSystems.whatever, i would expect it to boot
<clever> mac10688: all nix-shell does is set env vars, no namespacing occurs
<clever> fasd: and then `nix copy --to local?root=/mnt /nix/store/hash-source`
<clever> fasd: find the path under /nix/store/hash-source/
<clever> fasd: thats a bug with local?root=, you need to copy that storepath to /mnt with `nix copy`
<clever> day|flip: should be simple enough to update
<clever> or update the one in nixpkgs