2017-06-06

<clever> boomshroom: it means you added a nixos channel to your user, and not root
<clever> might be able to do that in an overlay then
<clever> that seems new
<clever> boomshroom: all-packages.nix has that code
<clever> boomshroom: you would need to look at how crossSystem gets passed to gccCrossStageStatic, and then manualy do those calls in your overlay
<clever> so it wont directly work as an overlay
<clever> boomshroom: you only get a cross-compiler if you set the crossSystem when importing nixpkgs
<clever> but you can just refernece it directly, and skip the libc stage
<clever> thats the cross-compiler that nix would normally use to make libc
<clever> boomshroom: with or without a libc?
<clever> execve

2017-06-05

<clever> the non -samll channels will also wait for hydra to try every job, but a fail wont block it
<clever> only tests failing can hold the channel back
<clever> nope
<clever> the order of an attribute set doesnt matter
<clever> but then if one thing fails to build, it holds the entire os behind
<clever> i would prefer to keep everything in systemPackages, so you can update everything at once
<clever> each has different pros and cons
<clever> either environment.systemPackages or a buildEnv in ~/.config/nixpkgs/config.nix
<clever> c74d: havent checked, i would assume that it has some fallback mechanism
<clever> so if you somehow had 1tb of swap, and tried to use more then 1tb of haskell heap, it would fail
<clever> i also recently thought of a potential exploit in that, reading the source, its not capable of allocating more space when that 1tb runs out
<clever> instead of constantly trying to allocate memory from the kernel and pay the overhead, it just grabs a 1tb chunk, and lets lazy allocation deal with it
<clever> haskell programs for example, i think use 1tb of virtual memory
<clever> if your text editor needs a daemon to hide the load times, it has issues
<clever> kuznero: does it use ghc-pkg?
<clever> kuznero: what does ghc-mod normally do behind the scenes?
<clever> kuznero: depends on how well you know haskell i think, i had some trouble getting it to work because the types where confusing at first
<clever> i just stick to vim
<clever> ah
<clever> nix-mode i think it was called
<clever> kuznero: i'm checking this to see what it does to ghc-mod
<clever> [clever@amd-nixos:~]$ nix-shell -E 'with import <nixpkgs> {}; haskellPackages.ghcWithHoogle (p: with p; [ shake ])' -Q -j 8
<clever> kuznero: there is a ghcWithHoogle function, that will generate a hoogle for a given list of hackage packages, and a ghc that can access them
<clever> oh, yeah, last change to that file, 23 hours ago
<clever> that part looks valid as well
<clever> does the error mention any other files or line numbers?
<clever> but i dont see anything abnormal with the latest version on master
<clever> that is what is activating that file
<clever> romildo: do you have programs.zsh.syntaxHighlighting.enabled set?
<clever> evangeline: --check can force a given derivation to rebuild, but the entire goal of nix is to track what can affect the build, and automaticaly rebuild when that has changed
<clever> evangeline: i believe the only option right now is to manualy read the file, its just text
<clever> evangeline: it was removed several months ago
<clever> and gcc has a setup-hook that will add everything in $buildInputs to the -I path
<clever> because installing things doesnt run the setup-hook
<clever> but if you do list it, it will just work
<clever> installing gcc breaks a lot of the features nix adds to help you
<clever> Filystyn: you need to add gcc to the -p list as well
<clever> you can paste code into that {} that will call it
<clever> but that just tells nix-instantiate to eval the {} at the end and create its .drv file
<clever> evangeline: that isnt inside an attrset or let block, so its not valid
<clever> Filystyn: what nix-shell args are you using?
<clever> nix-build builds it for you, acording to directions in a nix expression
<clever> nix-shell gives you a shell for building
<clever> Filystyn: your suppossed to do everything inside either nix-shell or nix-build
<clever> Filystyn: your not supposed to install libraries on nix
<clever> evangeline: these arguments can be passed in
<clever> nix-instantiate -E 'with import <nixpkgs>{}; (callPackage ./pkgs/development/ruby-modules/bundler-env { }) { args = "go here"; }'
<clever> evangeline: ah, bundler-env/default.nix has to first be loaded with callPackage, then called with arguments to define what it should build
<clever> and the path must begin with either a ./ or a /
<clever> evangeline: the ; at the very end doesnt belong
<clever> evangeline: what was the exact command you ran?
<clever> kojiro: in my setup, that is stored in vim.nix, and then i have imports = [ ./vim.nix ]; in my configuration.nix
<clever> the one in nix.conf will probably be smarter, and only run on the path that has just changed
<clever> kojiro: looks like it
<clever> evangeline: nix-instantiate -E 'with import <nixpkgs>{}; callPackage ./path/to/bundler-env {}'
<clever> gleber_: is escript in $PATH at that time?
<clever> gleber_: as long as the file exists during the patchphase, it should work
<clever> gleber_: yeah, patchSheBangs will fix the problem, once you know which file, oh, its make/emd2exml, so just postPatch = "patchSheBangs make"; i think?
<clever> gleber_: not really, but you could temporarily delete /usr/bin/env from the host, thats not likely to cause too many problems
<clever> gleber_: but even with nix-shell --pure, you still have a /usr/bin/env
<clever> gleber_: nix builds are sandboxes, so they dont have a /usr/bin/env
<clever> gleber_: what is the error its giving?
<clever> gleber_: the shell made by nix-shell also sources setup for you, so thats not required
<clever> gleber_: nix-shell launches a new shell, so the ; at the end wont do waht you want
<clever> xificurC: yeah, you must always use nix-store --delete to remove things from the store
<clever> xificurC: try it on a path your cache has that you dont
<clever> xificurC: nix-store -r /nix/store/foo will work on any path in a binary cache
<clever> sphalerite: '<nixpkgs>' will resolve to the path of nixpkgs
<clever> i got an email today about multi-mc failing due to a dep
<clever> dihuteno: i think you can do services.openssh.extraConfig = lib.mkForce ''.....''; to do that
<clever> dihuteno: what exactly are you trying to do?
<clever> dihuteno: thats part of the nixos module, not the package, so it has to go into services.openssh
<clever> gchristensen: i'm guessing its a haskell thing
<clever> dihuteno: yeah
<clever> dihuteno: nixos will merge all of them together
<clever> dihuteno: you can list extra modules in the imports section, and they have the identical syntax to configuration.nix
<clever> neoo: when you import nixpkgs like that, it reads the config.nix from $HOME, but you can force a custom config like i just showed
<clever> neoo: yeah, line 12 is the problem, you want to put this at the end of 6, { config.allowUnfree = true; }
<clever> oh wait, and he is doing that in a weird way
<clever> FRidh: he is already doing that, but its using a different config.nix
<clever> gleber_: is it being ran during buildPhase as well?
<clever> xificurC: callPackage ./as-table {};
<clever> gleber_: i would do it in preConfigure or postPatch
<clever> but you can manualy run the patchSheBangs function on any directory
<clever> fixup is after install
<clever> gleber_: its done by the patchSheBangs function, that runs during the fixup phase
<clever> jophish: if a temproot exists for a pid that does not, id call that a bug, and you should be able to safely rm -rf the temproot
<clever> nice
<clever> is process 21274 still alive?
<clever> ah yeah
<clever> the --roots really needs to not hide those invisible roots
<clever> yeah, not sure if that query exists
<clever> what about its referers?
<clever> ah, try the referrers hash in the above command then
<clever> that sounds like sqlite
<clever> you should see the open syscall being used on a /proc path, then a read() syscall that contains the hash
<clever> i think
<clever> strace -s 5000 nix-store -q --roots /nix/store/something 2>&1 | grep -C5 --color <hash>
<clever> to see where its finding that root
<clever> jophish: strace with -s 5000 and then grep its output (beware, its on stderr) with "grep -C hash"
<clever> jophish: a lot of /proc files are special, you need to strace nix-store --query --roots, as root
<clever> does sound fun
<clever> jophish: ah, and hydra uses visible roots, so that shouldnt be to blame either
<clever> as will sudo nix-store --delete
<clever> jophish: ah, an old nix-shell can possibly do that
<clever> danbst: there is an open issue about bringing the jobs attrset back, so you can describe generic services that dont depend on systemd
<clever> jophish: what is the path?
<clever> jophish: there are invisible roots, under /proc
<clever> that does look like a compact system
<clever> its a 2U server
<clever> its running hydra, lol
<clever> i do have nixos on my router, but its not light
<clever> heh
<clever> ah
<clever> havent done much with it yet, its mostly just an example for others now
<clever> so nixos-unstable-small wont brick your machine, but you may have to rebuild half the packages
<clever> unlmtd: the -small channels only wait for testing, not for hydra to build everything

2017-06-04

<clever> akamaus: dont think so
<clever> akamaus: not sure then, what error is it having?
<clever> akamaus: is nvcc a compiled program or a bash script?
<clever> akamaus: does nvcc call cc or gcc in the end?
<clever> which doesnt have platform set
<clever> dhess`: it breaks the infinite recursion by using the .platforms from a 2nd instance of nixpkgs
<clever> akamaus: cc-wraper is what nix uses as gcc, it handles all of the buildInputs logic for you
<clever> but now it doesnt
<clever> previously, it would lazy its way around and allow config to depend on lib.platforms
<clever> dhess`: like this
<clever> platform = (import <nixpkgs> { config = {}; }).platforms.aarch64-multiplatform;
<clever> dhess`: the infinite recursion is a new problem, you need to import a nixpkgs with no config, and use its platform
<clever> dhess`: nixpkgs.config.platform maybe?
<clever> dhess`: i believe you need to set nixpkgs.platform in configuration.nix, if your doing nixos stuff
<clever> $NIX_DEBUG=1 i think
<clever> akamaus: you may also need -p gcc, nix-shell defaults to not including gcc now
<clever> yeah
<clever> its probably to deal with packages that clear CFLAGS in the makefile
<clever> and the gcc wrapper forces it to be added to the gcc args
<clever> LnL: nix uses one of those internaly, to add the buildInputs to the default search path
<clever> akamaus: it may also be $NIX_CFLAGS
<clever> akamaus: it uses $NIX_CFLAGS_COMPILE
<clever> nix_n00b: your not supposed to install compilers on nixos, your supposed to use nix-shell
<clever> Avery[m]: as long as the right device is mounted to /boot and boot.loader.grub.device is still correct
<clever> then nixos-rebuild boot, after fixing the config
<clever> Avery[m]: nixos-install --chroot

2017-06-03

<clever> yeah
<clever> ris: it checks things in /proc to find anything open or in env variables
<clever> deba5e12: did you use the wpa_supplicant service in systemd, or manualy launch wpa_supplicant?
<clever> yep
<clever> roblabla: override one or more of the packages, so they dont depend on eachother
<clever> elehack: some kernel options i have looked into before to make both linux and nixos reboot upon any kind of problem
<clever> elehack: as long as you can remotely force a reboot, or ensure it reboots upon failures
<clever> tanonym: not sure why
<clever> KABA: while LD_LIBRARY_PATH just changes the search path, just be sure to prepend/append, because opengl also needs LD_LIBRARY_PATH to stay intact
<clever> KABA: LD_PRELOAD can potentialy break some programs that your program may spawn, since it forces things to load
<clever> tanonym: oh, i see the problem, its 32Bit, not 32bit
<clever> tanonym: can you gist your configuration.nix file?
<clever> because it goes to the 2nd oldest, not the previous
<clever> rollback sets current = current-1, but if you do update, rollback, update, rollback: it will wind up on the wrong generation
<clever> maybe rollback would work for the 2nd one, but thats got a minor issue when you go forward and back often
<clever> elehack: yeah, you would sort of need to run nixos-rebuild boot twice, and have the 2nd time undo the change, creating a "dead" previous generation, that you could grub-reboot to
<clever> elehack: that tool lets you do one-time changes to the default boot entry
<clever> elehack: you can maybe do something with grub-reboot, but you would need to experiment on a box with a monitor
<clever> jophish: nix-serve can sort of do that already, but you would have to add every machine as a binary cache
<clever> arianvp2: neat
<clever> m0rphism: as long as you have +w on the directory, you can probably delete/replace anything
<clever> m0rphism: vim will save to a temporary filename, then use rename to atomicly replace the file
<clever> even if you dont have physical access
<clever> you can basicaly turn any linux machine into a nixos machine
<clever> jophish: have you seen how much ive automated with kexec and nixos? https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
<clever> :D
<clever> then you found it broken before that time came
<clever> and then stayed on that setting, until the next renewal
<clever> ah
<clever> jophish: try pulling wireshark up, then rebind again and see how many replies you get
<clever> jophish: something else that can lead to alot of confusion, is if you happen to have 2 dhcp servers on the network
<clever> wireshark should also help, filter it to port 67
<clever> jophish: if your using dhcpcd, this should re-query the server
<clever> dhcpcd -n, --rebind [interface]
<clever> what is the dhcp server sending?
<clever> jophish: you can also tell nixos to just ignore the dns mentioned by the dhcp
<clever> jophish: read /etc/resolv.conf
<clever> calvertvl: you may need to reboot, nixos-rebuild doesnt load kernel modules
<clever> but qemu is better if you know exactly what you want to do, and/or want automate things
<clever> i find that the vbox gui is good for when you dont know what options you want, and want to play with things
<clever> nix_n00b_: the host options have to be enabled first, https://nixos.org/nixos/options.html#virtualbox.host

2017-06-02

<clever> pseudo-sue: more documentation is at https://nixos.org/nixos/options.html#security.wrappers if you want to try using setcap rather then setuid
<clever> pseudo-sue: this makes dumpcap setuid root, only executable by members of the wireshark group, creates the group, and puts my user in the group
<clever> joehh_: nixos-unstable-small is only 6 hours old, so you can try that one
<clever> Drakonis[m]: ive run into similiar problems on gentoo
<clever> ive had an ubuntu server fail mid way thru dist-upgrade, and leave a mess everywhere
<clever> allowing multiple glibc's also allows you to update glibc without the risk of breaking things
<clever> but nix-env can make it easy to have dozens of apps, spread over dozens of glibc's
<clever> as long as you install everything in a declarative way, you will only have 2-4 glibc's (32bit, 64bit, possibly over 2 channels like your doing)
<clever> joehh: nix uses absolute paths for everything, i think i have 8 to 10 glibc's on my desktop
<clever> yeah, because you imported nixos-unstable, it wants the nixos-unstable version of glibc, and everything else dropbox depends on
<clever> the example ToxicFrog originaly gave uses the /root/.config/nixpkgs/config.nix to set unfree
<clever> joehh: what is in /root/.nix-defexpr/channels/
<clever> joehh: did you --list with or without sudo?
<clever> thats how things would work if you use nix-channel
<clever> you can put a url into configuration.nix, but then nix may update it without warning
<clever> its like #include <stdio.h>
<clever> you do need it
<clever> yeah
<clever> drakonis: [x]
<clever> in the directory you where in when you ran nix-build
<clever> it creates a symlink called result by default
<clever> nope
<clever> yeah
<clever> drakonis: does "git remote -v" show your fork?
<clever> drakonis: when you push your changes to github, that will update it
<clever> you need to push to a fork you made on github, then use the ui in the browser
<clever> there is a nix-prefetch-url for when its a simple url
<clever> drakonis: nix doesnt hash the bare tar in most cases, so you need to use the hash nix-build spits out
<clever> :)
<clever> that should help in manually running dhcpcd to get an ip
<clever> you should be able to find the path to dhcpcd
<clever> capisce: if you run nix-store -qR /run/current-system | grep dhcp
<clever> anything in "journalctl -f -u wpa_supplicant" ?
<clever> is the wpa config in /etc/wpa_supplicant.conf ?
<clever> capisce: stop it, then run "systemctl start wpa_supplicant"
<clever> capisce: did you run the wpa service or manualy start wpa_supplicant?
<clever> capisce: nixos uses dhcpcd, it works pretty much the same way
<clever> LnL: so i dont think hydra can do everything in a real channel
<clever> LnL: programs.sqlite is an IO heavy part of the channel that needs external access
<clever> the nix-channel manpage also shows that, yeah
<clever> it just needs to be an http directory containing 2 files, binary-cache-url and nixexprs.tar.xz
<clever> not sure, i havent really used perl since 2005, and even then, i'm not sure if ive ever seen a perl repl, lol
<clever> and 19, tell it to read the config
<clever> jophish: i think you need to import nix first
<clever> jophish: oh, and what if you run nix-daemon from nixUnstable?
<clever> but ive never tried using the perl modules, and they have since been purged
<clever> all i can think of is just nix-shell -p perl nix
<clever> jophish: beyond that, its just my usual answer, throw strace at it, and look at every syscall!
<clever> jophish: you could try opening a perl repl, importing nix, and then seeing what it claims the config has
<clever> my @urls = strToList($Nix::Config::config{"binary-caches"} //
<clever> yeah
<clever> but thats only for when binary-caches isnt present in nix.conf
<clever> if the store is still at /nix/store, it will default to cache.nixos.org
<clever> jophish: line 241, i see a similiar default to the c++ one
<clever> jophish: 1.11 is still using the perl binary cache handler, let me see
<clever> jophish: both default to an empty list in the latest version
<clever> not sure then
<clever> jophish: any env variables starting with NIX_ set in the daemon context?
<clever> i think each worker the daemon spawns will re-read the file, so restarting isnt required
<clever> jophish: where is the nix.conf file?
<clever> it shouldnt
<clever> jophish: ah, what happens if you just remove cache.nixos.org entirely?
<clever> jophish: i believe its purely on the order, and if you use mkForce, it will bypass the default value, so you can add cache.nixos.org near the end
<clever> i'm also using a hangouts extension in chrome
<clever> and people still stick with it, because they think skype is better
<clever> so M$ bought skype, and then turned it into MSN
<clever> something i heard years ago, is that nobody liked MSN, but everybody liked skype, because of the history with how good it was
<clever> lol
<clever> ah
<clever> i cant even see the images people embed in chat without having to sign in on a browser for every single image
<clever> M$ has been slowly ruining linux support
<clever> ive not tried the new skype yet
<clever> ah
<clever> yeah, i cant find it on the old skype 4.3
<clever> oh wait, thats where they hide it on windows, lol
<clever> under the call menu is share your screen
<clever> Nobabs27: skype and hangouts both have screen sharing without control
<clever> Drakonis[m]: ah yeah, i think i saw you mention it yesterday?
<clever> Drakonis[m]: make a nix file sort of like this and then run nix-shell against it: with import <nixpkgs>{}; clangStdenv.mkDerivation { name="name"; buildInputs = [ libpcap ]; }
<clever> Drakonis[m]: there is a clangStdenv as well to handle that
<clever> deba5e12: strange, it only looked in the libc directory, and nowhere else
<clever> Drakonis[m]: if your using normal gcc and nix-shell, it just works with things like -lpcap
<clever> deba5e12: ive seen a java engine do that as well
<clever> deba5e12: next thing i would do is to run the failing command under "strace -ff -o logfiles -e open ..." and then see what paths its trying to open
<clever> what is the exact error it gives?

2017-06-01

<clever> dang
<clever> try running the lisp repl inside the above nix-shell and see if that helps
<clever> how often would you have to compile it?