<clever>
Myrl-saki: it also allows you to use template-nix instead of template haskell
<clever>
Myrl-saki: i have also made a runHaskell variant
<clever>
all derivations are actually sets containing a .outPath
<clever>
and you just wind up with whatever .outPath was
<clever>
if any attribute set contains .outPath, it can be blindly cast to a string
<clever>
> "${ { outPath = "not-a-path"; } }"
<clever>
but --argstr assumes the value is a string, and saves you the trouble
<clever>
so you would be forced to do --arg key '"value"'
<clever>
ben: the main difference between --arg and --argstr, is that --arg will try to parse the arg as nix
<clever>
so now i can edit nix on a linux machine, and then build darwin binaries
<clever>
and the 2nd one forces it to do a darwin build, using my build slaves
<clever>
the default.nix accepts 2 strings as arguments
<clever>
ben: a recent usage of --arg: `nix-build default.nix -A cardano-sl-wallet-new --argstr gitrev 1234 --argstr system x86_64-darwin`
<clever>
ben: and if you dont use -f, it will generate an attribtue set by doing a weird recursive search of ~/.nix-defexpr/
<clever>
ben: and if --arg or --argstr is used, it will pass it to each of those 4 functions
<clever>
ben: so i could do `nix-env -f foo.nix -iA foo.bar.baz`, and then have it call 4 functions (foo.nix itself, foo, bar, and baz)
<clever>
and nixos.hello in an expression does not do that
<clever>
when you nix-env -iA nixos.hello, it splits nixos.hello into a list, and then for each element, it will look it up in a set, then test what the type is, and maybe call it with all of --arg, then repeat
<clever>
nix-env's -A is also pretty confusing
<clever>
yeah
<clever>
that 2nd one will overwrite all of foobar
<clever>
oh wait no
<clever>
you could also { inherit (something) foobar; } // { foobar.somekey = "somevalue"; }
<clever>
infinisil: is it a 32bit or 64bit program?
2018-05-16
<clever>
iqubic: have you tried comparing `pactl list` and `pavucontrol` ?
<clever>
dmj`: export NIX_REMOTE=daemon
<clever>
that looks more like somebody logging out
<clever>
probably unrelated
<clever>
lack of activity from other things
<clever>
iqubic: any 5 second gaps around the time when it should have finished booting and should be showing a login screen
<clever>
iqubic: journalctl
<clever>
iqubic: check the things i previously mentioned
<clever>
maybe
<clever>
pip3000: after it boots, go over `lsmod` and see if you can find anything that looks keyboard, input, or hid related
<clever>
pip3000: we will need to identify which kernel module handles it, and add that to boot.initrd.availableKernelModules in your configuration.nix
<clever>
pip3000: do you have a usb one on-hand to test that out as well?
<clever>
iqubic: yeah, i can wait
<clever>
pip3000: usb keyboard?
<clever>
iqubic: anything abnormal in the journal for lightdm or `systemd-analyze blame` ?
<clever>
kiloreux: have you tried quoting that argument to makeWrapper?
<clever>
Dezgeg: some programs just have a for loop to close all unexpected FD's after a fork, and before an execve
<clever>
angerman: glibc and system() has a similar problem, system() needs a path to sh to execute things, but sh depends on glibc, currently nixos just assumes you always have a /bin/sh
<clever>
angerman: you could also patch it to expect an env var pointing to the path, and then use setup-hooks to add it later
<clever>
angerman: oh, but you cant use it to solve a dependency cycle, because the hash your looking for depends on the hash of the thing asking for it
<clever>
it is fairly safe, as long as you understand that the path may not exist
<clever>
angerman: it takes a string, and discards the context, which is how nix knows the string depends on a derivation
<clever>
bkchr[m]: was something copied from a mac with rsync?
<clever>
bkchr[m]: are you on a mac?
<clever>
FruitieX: what does file say on them, and do those paths exist if you do `steamrun bash` ?
<clever>
FruitieX: steamrun should help, try debugging under that
<clever>
FruitieX: and there is also the steamrun package, which lets you run things in that chroot
<clever>
FruitieX: steam runs under an FHS chroot, that provides files at the right paths
<clever>
bkchr[m]: thats normal for a new install, running nix-env -i will fix it
<clever>
FruitieX: you need to run patchelf on the binary to fix the ld.so path
2018-05-14
<clever>
then tmux will be the first thing in PATH
<clever>
nico202: you can also export PATH=$(nix-build '<nixpkgs>' -A tmux)/bin:$PATH
<clever>
first i'm hearing of that, but their channel has come up in past conversations
<clever>
they also have an irc channel, #worksonarm
<clever>
ah
<clever>
?
<clever>
which is why its disabled by default
<clever>
kreetx: in theory, a bootloader based malware could put your entire OS into a vm, without it noticing, and then do naughty things in the background
<clever>
kreetx: its probably accelerated vm extensions in the cpu
<clever>
kreetx: your supposed to manage the channel as root when using a multi-user setup
<clever>
unlmtd: read it and see if it checks for things like .version?
<clever>
i suspect the kernel has to be built in the right mode to even look for that section
<clever>
sphalerite: it just replaces the initrd section in the ELF layout
<clever>
sphalerite: oh, and reading the wiki closer, it only works on a kernel that already has an initrd baked into it at compile time
<clever>
you might be able to modify the linux derivation to also include an uncompressed vmlinux in its output
<clever>
nix just makes it tricky to use that
<clever>
sphalerite: ive not tried forcing such a thing on the kernel after its built, but i do know that linux has a compile-time option to embed an initrd into it
<clever>
kreetx: yeah, it should all be in the nix manual
<clever>
you need to manually configure /etc/nix/machines with the sshkey and user/host of a linux build slave (which can be in virtualbox, if you remember to turn it on for builds)
<clever>
so it just fails
<clever>
but now that darwin is using a multi-user setup, it doesnt have permission to do that
<clever>
kreetx: previously, nixops would auto-configure the virtualbox as a buildslave and just work
<clever>
dhess: i think you need to restart nix-daemon
<clever>
sphalerite: the nixBuild bash function would need to be adjusted to use nix build
<clever>
sphalerite: nixos-rebuild internally uses nix-env, so that needs to be fixed first
<clever>
sphalerite: ive also wanted that single-line output with nix-shell
<clever>
dhess: nixops downloads everything to the deployment host, then re-uploads the build deps to a build slave
<clever>
probably both
<clever>
yeah
<clever>
dhess: and next time it does a nixops deploy or reboot, it will revert the file back to its proper version
<clever>
dhess: you need to manually replace the /etc/nix/nix.conf symlink with a file having the same contents, then edit that file to remove the hydra
<clever>
sphalerite: it might help if the -o option made an indirect root on the remote machine
<clever>
and they might get GC'd during that last step?
<clever>
oh, wow, nice
<clever>
sphalerite: yeah, but the master would just re-upload things when it starts the next build
<clever>
sphalerite: i think ive seen some bugs where the darwin garbage collector cant see all in-use files
<clever>
PolarIntersect: how are you attempting to install it?
2018-05-13
<clever>
Lisanna: what filesystem are you using?
<clever>
Lisanna: about your only option is to wait for GC to finish
<clever>
Lisanna: welp, there goes your entire cache of downloaded things :D
<clever>
then it starts to actuall delete
<clever>
Lisanna: and you wont gain any space until it has either found all the garbage, or hit the max-freed limit
<clever>
Lisanna: yeah, it will MOVE all the garbage into /nix/store/trash, as it collects garbage
<clever>
the more you try to delete at once, the longer it will take to even give you 1 byte
<clever>
after deleting that much, it will stop
<clever>
yeah
<clever>
so it deletes 1gig at most, rather then everything
<clever>
Lisanna: thats why i tend to use nix-collect-garbage --max-freed=1g
<clever>
double-check, do you happen to have 2 GC's running at once?
<clever>
Lisanna: it may be trash left-over from a previous gc?
<clever>
Lisanna: the GC is taking a long time because its running `rm -rf /nix/store/trash`
2018-05-12
<clever>
wohoo: if you search nixpkgs for libredirect you can find some examples
<clever>
wohoo: i would use libredirect to reconfigure it to save under $HOME
<clever>
wohoo: is it more of a service or an application?
<clever>
wohoo: which app wants to create what files?
<clever>
wohoo: what kind of data?
<clever>
it sometimes misleads people into thinking they can .overrideAttrs it
<clever>
i avoid putting a version attribute on things, and try to go for a version in a let block
<clever>
robstr: oh, and i already have s3fs working without any fancy systemd units
<clever>
which leads to scripts only working when ran from a shell
<clever>
jD91mZM2: oh, of note, if you try to run a "script" that lacks a #! but it is +x, bash will just run itself on the file
<clever>
you can also build a custom livecd, that includes justdoit in the image
<clever>
robstr: you must clearly define exactly what you service needs, and not risk maybe getting it because you already installed it, then it fails for others
<clever>
check `ip route` and confirm if the gateway and routes are right, and try to ping the gateway
<clever>
sounds more like routing or gateway problems
<clever>
and can you ping that dns server?
<clever>
if you have 2 connections active, it may stick to the first one that was working
<clever>
jD91mZM2: does /etc/resolv.conf update when you connect with wpa_supplicant?
<clever>
jD91mZM2: is there any ethernet plugged in while your testing the wifi?
<clever>
pingu_: channels can be used, but i dont really bother with them
<clever>
pingu_: just add it to the binary caches list in your nix config, and run nix-build against the identical nix expressions, and it will download the pre-built stuff
<clever>
pingu_: the hydra website is also a binary cache
<clever>
yep
<clever>
try without the gitignoreSource and see how bad the rebuilds are?
<clever>
yeah
<clever>
gitignoreSource does the same, but its acting on the hash of the entire project, not the subdir
<clever>
qenuh: and if the contents of the dir havent changed, the path wont change, and it wont trigger a rebuild
<clever>
qenuh: cleanSource will hash the directory after cleaning, and base its storepath on that hash
<clever>
with the right order of operations enforced
<clever>
qenuh: what about running cleanSource on a subdir of gitignoreSource?
<clever>
cleanSource doesnt read .gitignore
<clever>
so it applies cleansource to the subdir
<clever>
you want to wrap the (path+string)
<clever>
qenuh: that is why it fails
<clever>
qenuh: due to order of operations, that is interting ALL of ./., which includes the non-haskell changes, then appending "haskell-project" to the path
<clever>
> let f = x: "foo"; in f "a" + "b"
<clever>
> let f = x: "foo"; in x "a" + "b"
<clever>
> let f = x: "foo" in x "a" + "b"
<clever>
cheater: there is also ${stdenv.shell}
<clever>
qenuh: run nix-instantiate on the derivation, then make a change and nix-instantiate again, then nix-diff the 2 .drv's
<clever>
qenuh: did you do 2 full builds or 1?, cleanSource will likely cause 1 rebuild because the paths change some