<ottidmes>
infinisil: you do understand the intent, right? I mean the examples I gave should speak for themselves.
<infinisil>
Yeah
<infinisil>
Oh, you know what would be cool, a vim plugin to jump to some file in nix code. So e.g. you can have the cursor under `./foo` in `callPackage ./foo {}` and press a key and it would jump to that file. Probably exists already, it's not really nix specific
<infinisil>
Then you just have to know where an attribute is defined and then you can navigate from there
<ottidmes>
infinisil: I have updated the gist to include my old shell function, the one I am trying to update now, pkgname, i.e. given /nix/store/58r35bqb4f3lxbnbabq718svq9i2pda3-hello-2.10 or just even hello, give the me the package attribute name defining it, which in the case matches perfectly but in practice this does not have to be the case
<infinisil>
Hmm I see
<{^_^}>
[nixpkgs] @marsam opened pull request #52747 → guff: init at 0.1.0 → https://git.io/fhUf7
jonaswouters has quit [Quit: Connection closed for inactivity]
nD5Xjz has quit [Ping timeout: 268 seconds]
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aleph- has joined #nixos
<ma9e>
infinisil: you can do that with "gf" in vim, i use it all the time
<Dandellion[m]>
basically, clone nixpkgs, add your .nix in some folder that makes sense for it, and callPackage the nix file in top-level/all-packages.nix
ddellacosta has quit [Remote host closed the connection]
<aleph->
Yeah I ended up just changing it slightly, doing a let pkgs = import <nixpkgs> {}; in pkgs...
<aleph->
Dandellion[m]: Better question, what would be the way to create paths relative to the root of the nix store hash/package store?
<aleph->
Trying to create them in the install phase.
<Dandellion[m]>
I'm sorry but I'm extremely new to this as well, so someone else would have to answer this :/
<zfnmxt>
NixOS noob here: I want to specifiy the BusID for my GPUs in xorg.conf. (The generated xorg.conf lacks these IDs). What's the best way to accomplish that?
<pbb>
I'm also a noob, but can you maybe specify it with services.xserver.config?
<zfnmxt>
Right, but it seems like that might overwrite the entire config, right?
<zfnmxt>
I just want to ammend the generated one :V
<zfnmxt>
"extraConfig" also doesn't seem like it'd work...since it's ammending a specific Device section that's already generated.
<zfnmxt>
So not really sure what the best way is.
<pbb>
have you tried with
<pbb>
"";
<pbb>
services.xserver.config = ''
<pbb>
...
<pbb>
from my experience this amends to the previous definition
<pbb>
at least in some places it behaves like that
<pbb>
eh, s/""/''/g
<drakonis>
you'd have to specify your entire config like that
<pbb>
what section do you want to amend to?
<zfnmxt>
Is it possible to have NixOS simply not generate the Device sections for my GPUs?
<zfnmxt>
I just have two GPUs, the generated xorg.conf is like "Section "Device" Identifier "Device-intel[0]" ...EndSection Section "Device" Identifier "Device-nvidia[0]" ... EndSection"
<zfnmxt>
To each of those, I want to simply add a "BusID" field, since X won't start without it.
<pbb>
okay, are the configs for that maybe set in the hardware-configuration.nix file?
Anton-Latukha has quit [Quit: Leaving.]
<zfnmxt>
No clue, hardware-configuration.nix remains a mystery to me :)
<pbb>
because without any config those sections would not be generated
<zfnmxt>
Is there a man page for the hardware-configuration.nix stuff?
<pbb>
I don't think so? it is just a pregenerated file with the necessary config options, so the options set there are the same you can set in other files
<zfnmxt>
i.e. where can I look up things like config.services.xserver.drivers.nvidia.deviceSection
<pbb>
so you can see there that it generates a device block for each cfg.drivers, and further up it sets cfg = services.xserver.config
<pbb>
ugh
<pbb>
I meant cfg = config.services.xserver
<pbb>
but you get the point. since all of those modules are also just nix expressions you should be able to read them once you're more familiar with nix
<zfnmxt>
Hm, wait. Line 712 says "services.xserver.config"
<zfnmxt>
So why isn't it "services.xserver.config.driver.deviceSection"?
<pbb>
the options are taken from driver.deviceSection. driver is taken from cfg.drivers (L. 756) and cfg is defined in L. 10
<pbb>
services.xserver.config is where the generated config file is saved
<zfnmxt>
Ah, I see :D
<pbb>
oh, you probably have to omit the "config."
<pbb>
that would make it services.xserver.drivers
<pbb>
and from there it makes services.xserver.config
<samueldr>
the options system's modules can use the options system's options to further configure the system, which is what you're seeing AFAICT :)
<simpson>
I have a bunch of `runCommand` invocations, and then I'm collating them into a `linkFarm`. I'd like to run a final test on the link farm, and I'd like it to behave like a normal checkPhase. Is there a way to do that?
Guest17278 has joined #nixos
aleph- has joined #nixos
<elvishjerricco>
simpson: `overrideAttrs` on the linkFarm derivation and set `checkPhase` would probably do it.
Guest17278 has left #nixos ["User left"]
<simpson>
elvishjerricco: Thanks, I hate it~ Sounds great, I'll give it a shot.
endformationage has quit [Ping timeout: 240 seconds]
<jD91mZM2>
Why does fuse refuse (sorry, pun not intended until now) to work when gotten from nix-shell? I can use it normally no problem, but then I do `nix-shell -p fuse` and it doesn't work anymore. "Operation not permitted"
immae has quit [Quit: WeeChat 2.3]
<jD91mZM2>
More specifically, unmounting doesn't work. Mounting still works fine
abathur has quit [Ping timeout: 250 seconds]
fusion809 has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @dotlambda pushed commit from @r-ryantm to master « you-get: 0.4.1181 -> 0.4.1193 (#52755) »: https://git.io/fhUmm
AppAraat has joined #nixos
periklis has joined #nixos
<AppAraat>
hello, in nix-2.1.3-x86_64-linux/install I can set custom paths to where I can have my nix store. Will that break anything? I'd prefer my nix store to be in my home dir.
<elvishjerricco>
AppAraat: Nix
<elvishjerricco>
Nix 2.0 has chroot stores
<elvishjerricco>
Only on Linux
<elvishjerricco>
Dunno if there's a way to make a chroot store the default though
sbdchd has quit [Remote host closed the connection]
freeman42x[nix] has joined #nixos
<{^_^}>
[nixpkgs] @ivan opened pull request #52758 → snscrape: init at 0.1.3 → https://git.io/fhUYk
<{^_^}>
[nixpkgs] @vdemeester closed pull request #52581 → gitlab-workhorse: migrate to using buildGoPackage → https://git.io/fhvme
freeman42x[nix] has quit [Ping timeout: 250 seconds]
<sphalerite>
AppAraat: setting a custom store path will break binary substitution, i.e. you'll have to build everything (including the compiler toolchain and stuff) from source.
<elvishjerricco>
sidenote: Last time I tried to bootstrap nixpkgs from source manually, it failed with chgrp errors. That was disappointing
phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos
<sphalerite>
elvishjerricco: huh? I haven't had that problem
<elvishjerricco>
sphalerite: I did `nix build --substituters "" nixpkgs.hello`, and one of the `coreutils` tests failed w.r.t. to chgrp. Never really tried to figure it out beyond confirming that `mutableUsers = false;` did not influence it
juhe has quit [Read error: Connection reset by peer]
juhe has joined #nixos
<elvishjerricco>
er, add a `--store $(pwd)/foo`
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtojnar has joined #nixos
<{^_^}>
[nixpkgs] @akru opened pull request #52760 → lib/make-ext4-fs: more efficient store maker → https://git.io/fhUOU
lostman has quit [Quit: Connection closed for inactivity]
seanparsons has joined #nixos
<Orbstheorem>
So, I just made a new derivation based on an existing configuration (https://tinyurl.com/y7mntotr) I built it using `nix build -f =(echo "with import <nixpkgs/nixos> {}; system") -I nixos-config=Triglav-ccc.nix` and installed it on a new drive using `sudo nixos-install --root /mnt/local/now --system $(readlink -f result)` However, the channel installed on the system is 18.03. How can I configure it to install
<Orbstheorem>
version 18.09? do I have to change system.stateVersion?
<ottidmes>
,stateVersion Orbstheorem
<{^_^}>
Orbstheorem: Setting stateVersion to the latest release doesn't update anything and can only break your setup at best. If you want to regardless, Ctrl-F for "stateVersion" in https://nixos.org/nixos/manual/release-notes.html to see things that need to be manually upgraded with the new value
<ottidmes>
Orbstheorem: so no, the state version has nothing to do with on what channel your are
JosW has joined #nixos
juhe has quit [Read error: Connection reset by peer]
<ottidmes>
Orbstheorem: what does nixpkgs point to when you check the value of NIX_PATH
<ottidmes>
Orbstheorem: but to answer your question, it is probably easiest to make a checkout that points to 18.09, i.e. clone https://github.com/NixOS/nixpkgs and follow the instructions in the README here: https://github.com/NixOS/nixpkgs-channels, and then do `NIX_PATH=nixpkgs=/path/to/your/checkout nix build -f =(echo "with import <nixpkgs/nixos> {}; system") ...`
jasongrossman has joined #nixos
<ottidmes>
Orbstheorem: or do whatever you do with nix-channels to make that happen, but that would also update your build system
<obadz>
is there a way to download a closure from ofborg's cache?
Lears has quit [Ping timeout: 250 seconds]
sigmundv_ has joined #nixos
<siraben>
Anyone able to reproduce a weird package conflict when I install firefox and tor-browser-unwrapped ?
iyzsong has joined #nixos
<ottidmes>
siraben: that is not that weird, the tor browser is based on firefox, so there will be collisions between them when installed as part of systemPackages, since they will both supply certain files
<siraben>
How do I get Tor Browser to work then?
<siraben>
I can't launch it, and launching firefox breaks
<ottidmes>
siraben: good question, most collisions I had were simple documentation or executables, which are simple to resolve, but I doubt you can just give one priority and that it then is resolved. That probably only resolves the collision messages and not the actual problem. One thing I could think of is to run one from nix-env
<siraben>
ottidmes: are you able to get it to work?
<ottidmes>
siraben: I haven't tried it myself
<siraben>
ottidmes: could you try it? Perhaps it's reproducible
<ottidmes>
siraben: I do not doubt it, I get how it could be problematic if you install two very similar things in the same global namespace
markus1189 has joined #nixos
freeman42x[nix] has joined #nixos
Ariakenom has joined #nixos
juhe has quit [Read error: Connection reset by peer]
<ottidmes>
siraben: I just checked and installing from nix-env works
<ottidmes>
siraben: and also, it makes total sense that it breaks your firefox setup, considering this: /nix/store/qnsa6dgpm2n2ynzrlisyx2dba10lwq4c-tor-browser-unwrapped-7.5.6/bin/firefox, it even uses the exact same profile directories and such, so you really should consider tor as a firefox, and running two firefoxes is possible with NixOS, but you cannot have 2 globally installed
juhe has quit [Read error: Connection reset by peer]
juhe has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
Synthetica has joined #nixos
<ottidmes>
Synthetica: I just tried installing your nix-linter, but if I use the instructions I get error: cannot auto-call a function that has an argument without a default value ('stdenv')
slyfox has joined #nixos
<Synthetica>
ottidmes: Oh, that's strange, I don't think I use stdenv anywhere in the repo...
<ottidmes>
Synthetica: it might be my setup, not sure, but I normally only get this when not properly callPackage'd, I just ran sudo cachix use nix-linter, added the config, rebuild switched, and ran: nix-build -A nix-linter
<ottidmes>
when I run it with verbose I get: evaluating file '/nix/store/3ca5bpxi3rcb4zmw4ppi3d2jd0rf6vpa-nix-2.1.3/share/nix/corepkgs/derivation.nix'
<ottidmes>
Synthetica: I guess I will just clone it and build it from source
<Synthetica>
Oh, yeah, I don't think you can install from cachix that way (domenkozar ?)
<Synthetica>
The intention is that you clone and then do that, I should probably make that more clear in the readme
agander has quit [Ping timeout: 250 seconds]
<ottidmes>
Synthetica: ah, that makes more sense to me, I was already thinking, what kind of magic is going on, does it not need to have the sources which are not in nixpkgs, to determine whether it can get it from cache, but it does, no magic, good to know!
siers has joined #nixos
hotfuzz has joined #nixos
<domenkozar>
yeah cachix only takes care of binaries
<domenkozar>
there's no overlays support as such :)
<ottidmes>
AppAraat: the attribute name has to be unique, but you can indeed have multiple attribute names referring to the same thing, and thus giving multiple hits
<{^_^}>
[nixpkgs] @zimbatm merged pull request #51541 → fix infinite recursion caused by the unnecessary inspection of options → https://git.io/fpXG7
<{^_^}>
[nixpkgs] @zimbatm pushed commit from @msteen to master « fix infinite recursion caused by the unnecessary inspection of options + fix is parent of mount point check (#51541) »: https://git.io/fhUCk
<AppAraat>
ottidmes: so in this case one has attribute "nixpkgs.rofi" and the other has "nixpkgs.rofi-unwrapped" ?
<ottidmes>
AppAraat: right
<AppAraat>
hmm ok, thanks.
<Phillemann>
ottidmes: Oh, I just didn't think it'd be _that_ simple. Thanks!
<ottidmes>
AppAraat: and thank you! Yesterday I made a complicated solution to figure out the file defining a package, and did not know this information was actually in the meta attrset under the position attribute name. It does not cover all packages my solution does, so fortunately it was not a complete waste
<AppAraat>
haha, you're welcome. Had no idea I could be so useful :p
crmlt has joined #nixos
jD91mZM2 has quit [Ping timeout: 240 seconds]
<AppAraat>
hmm, does this mean it's trying to compile the derivation locally or is it getting the binaries from the server? http://ix.io/1wHp
agander_ is now known as agander
simukis has quit [Remote host closed the connection]
<AppAraat>
I guess I'm going to find out by issuing --prebuilt-only
<AppAraat>
hmm nope, still can't allocate memory.
simukis has joined #nixos
saltsa has joined #nixos
Dagger has quit [Excess Flood]
Dagger2 has joined #nixos
<ottidmes>
AppAraat: it will explicitly say if it is going to build paths, and it only mentions "these paths will be fetched" including "/nix/store/yiv4mk6mmi20s7v9c2fkj2gapbiw2pgm-rofi-unwrapped-1.5.1", so you just seem to be out of memory
<AppAraat>
I'm gonna try setting GC_INITIAL_HEAP_SIZE to 128mb
<AppAraat>
ok, 64 then
<AppAraat>
32? :S
<ottidmes>
AppAraat: on what device (or should I say apparaat?) are you running this?
<AppAraat>
heh, I'm using ~512mb out of 1.95G currently and it's in a VM
<ottidmes>
that is weird, 1.5G should be plenty
silver has joined #nixos
<AppAraat>
maybe there's no more storage available? http://ix.io/1wHt
<ottidmes>
any idea why nix-index does not include my overlays, while running the same command as nix-index does, does return things defined in overlays
crmlt has quit [Ping timeout: 268 seconds]
<LnL>
nix-index only works for stuff cached by hydra
<ottidmes>
LnL: right, makes sense considering it has to know the files in the outputs, my use case just needs the out path -> attr path aspect so it would not need it for that. Guess I could fork nix-index and simplify it to only do that
thc202 has joined #nixos
<kai_w>
nixpkgs.pkgsCross.avr.buildPackages.gcc is a drop-in replacement for the old avrgcc right? Or is there any subtlety I should be aware of?
<wedens>
is it possible to make indentation in nix-mode in emacs less annoying? it shifts everyting to the first column. e.g. I type `xyz = abcd { <RET>` and cursor is at the beginning of the line
<ottidmes>
siraben: Firefox for most things (with tree style tabs), Google Chrome for things I want to stay logged into (Gmail, Netflix, Spotify Web, etc.)
Theuni2 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<siraben>
<freenode_ott "siraben: https://addons.mozilla."> ottidmes: cool. I use Tridactyl myself
Dandellion[m]1 is now known as Dandellion[m]
<ottidmes>
siraben: you probably can, I am just not quite sure how, except for using nix-env to keep one or maybe just not installing one via systemPackages and using the direct store path (or make a small wrapper that only exposes the tor firefox binary as tor-firefox for example)
<siraben>
I think then the build for the Tor browser has to be patched
Theuni2 has joined #nixos
<ottidmes>
could be, I am not sure how other distros handle it, I do not maintain it, so no idea
<wedens>
what's the difference between adding something to `buildInputs` and to PATH in `wrapProgram`?
<siraben>
ottidmes: looks like I was installing it song all along
kisonecat has quit [Ping timeout: 250 seconds]
<siraben>
Should be tor-browser-bundle-bin
<siraben>
Hm but it didn't appear in nix search
<siraben>
I had to browse the GitHub repository
<siraben>
Never mind it does appear in nix search, should've updated cache
<ottidmes>
siraben: it being called -unwrapped was an indicator it was an internal package, but I did not know that tor-browser-bundle-bin was the right one either
<wedens>
ottidmes: thanks. I must've misunderstood something
<ottidmes>
wedens: its a bit more nuanced than that though, buildInputs bring things into scoped, and Nix is does some smart checking what things are going to end up to also be needed at runtime, and so some buildInputs can end up as runtime dependencies
<wedens>
yeah, that's what caused my confusion. I'm making a derivation for a bash script
<wedens>
and I was a bit confused why `buildInputs` didn't work, but `makeWrapper` did. makes sesnes, now that I think of it
<ottidmes>
wedens: so depending on how you package the bash script, if it uses explicit things like ${pkgs.jq}/bin/jq or just jq (doing ${pkg.jq} also makes it a dependency), it will require PATH for the latter
<samueldr>
buildInputs can do more than simply be "build Inputs". Some, like the *hook ones, will modify the build process
justanotheruser has quit [Ping timeout: 272 seconds]
genesis has quit [Remote host closed the connection]
lokado has joined #nixos
endformationage has joined #nixos
<Baughn>
Soo... I have a kernel param that needs to be applied specifically to first-generation Ryzen CPUs.
<Baughn>
Without which, some of them will crash. Because the C6 bug is *still* a problem.
kp__ has quit [Ping timeout: 250 seconds]
<ottidmes>
Baughn: Hmm, I had troubles with my first gen Ryzen with that too, I disabled a C state related thing in my BIOS and it went away, but I am not quite sure what the consequences are, probably higher power usage
<Baughn>
Higher power usage.
duairc has quit [Read error: Connection reset by peer]
<ottidmes>
bit with it enabled, it would crash every other week
<Baughn>
Quite.
<ottidmes>
so consider me interested if a patch can solve it. I rather build my kernel from source than having the higher power usage, or it is just a kernel param
<Baughn>
I'll let you know once I get the kernel to build. :)
<ottidmes>
ok, thanks!
Radivarig has quit [Ping timeout: 244 seconds]
<Church->
Hey is there a way for me to create directories inside a nice store path? Like when building a package inside the install phase I need to create a directory tree inside the root of the package path. So create like /srv/ in the path residing at /nix/store/aHsfjejs-source/
<Baughn>
Sure? mkdir.
<Baughn>
Only while building that particular derivation, of course.
<slabity>
Yea, in the install phase you can put `mkdir $out/srv` and you should get what you want
<slabity>
Assuming I'm understanding your question correctly
<Church->
Huh guess I'll see if that works, was stupidly trying to mkdir in the $src file tree and that wasn't working.
<wedens>
should I just rename them and append e.g. version prefix or can it be managed differently?
endformationage has quit [Ping timeout: 240 seconds]
<AppAraat>
ottidmes: I still get the "Failed to set locale" here despite me setting LOCALE_ARCHIVE_2_27 to /nix/store/qhdzv5xc39wjw8n1wdjr37ff6rdl77hh-glibc-locales-2.27 (which is the output of 'nix-build --no-out-link "<nixpkgs>" -A glibcLocales'
<AppAraat>
do I have to rebuild the definition?
<ottidmes>
Baughn: thanks, I will be trying it on my server! I have a Ryzen 1700, but with HT enabled as well. I just hope it is not that other bug mentioned in the issue you based your fixes on, because on my server is almost always on a low load, so I would expect more crashes than, but definitely worth a short, too bad though that it takes a few weeks to be sure
<ottidmes>
AppAraat: changes in env variable should not impact the result of a build, so no, rebuilding would just give you the same out path, could you test the result of: find /nix/store -maxdepth 1 > >(grep 'glibc-locales')
<ottidmes>
AppAraat: there sure it, I am using it in my systemPackages, just pkgs.rofi
<Myrly-kuri>
> A motivating example is the problem of using "fetchurl" on a dynamically generated tarball whose contents are deterministic, but where the tarball does not have a canonical form.
<{^_^}>
error: syntax error, unexpected ',', expecting ')', at (string):214:124
<Myrly-kuri>
What does this mean?
<Myrly-kuri>
Oh, I think I get it.
<simpson>
Myrly-kuri: A tarball is not internally sorted, but the files are simply added on in no particular order. Often the order is still chronological, so it's predictable, but that's not always the case.
_d0t has quit [Ping timeout: 246 seconds]
<simpson>
Some services will send you the same files, but not the same tarball.
<ottidmes>
Church-: it is not yet clear what the issue is with AppAraat's rofi installation, but I think the issue I linked is again about the different glibc-locales versions, where if you had 2.26 and 2.27 at the same time it caused problems because 2.27 used a backwards incompatible format
<Church->
ottidmes: So checking on nixpkgs, but rofi and rofi-unwrapped point to the same package
<samueldr>
which makes it better to install in systemPackages, there it'll be synced for sure
<AppAraat>
sounds like it just re-installed the same thing
<samueldr>
(here it's possible the unwrapped vs. not-unwrapped was a red herring)
<ottidmes>
at which point I always think, why are we still bothering with nix channels (the command, not the actual channels)! to me it seems they only complicate things.
<samueldr>
(but both unwrapped and not-unwrapped will have the "name" attribute set to rofi-unwrapped :/)
<samueldr>
ottidmes: write a better implementation + RFC of the concept then :)
<Church->
ottidmes: Huh
ntd has quit [Quit: ntd]
<slabity>
ottidmes: Can you elaborate?
<AppAraat>
yeah that confused me too, same name points to different things (or do different things point to the same name?) oh well :S
erictapen has quit [Ping timeout: 250 seconds]
<samueldr>
I think it's why we are "still bothering"; there is work towards a replacement (IIRC), but (1) channels aren't intrinsically bad, just a bit surprising in some points [imho] (2) ensuring a replacement is actually better is hard work
<samueldr>
yeah "same names different things" is the "surprising" part
<Myrly-kuri>
Are we talking about `-f channel:`?
<Myrly-kuri>
Or?
<samueldr>
no
<samueldr>
nix-channel and thair representation in the system
<ottidmes>
slabity: I always see questions pop up about nix channels that always have to do with things like root and user not using the same channels and other issues, while I just made my system so that everything refers to the same channel, and if I want others, like unstable for some packages, I can always do that with a pinned nixpkgs in my overlay
<Myrly-kuri>
Ah, I use a local git checkout. What's wrong with nix-channel?
<samueldr>
it's all due to how channels are per-user, except that root's channels are also present by default in a user's channels; additionally, the system's built using root's channels
<Myrly-kuri>
Oh.
<samueldr>
Myrly-kuri: I think (opinion) it's all part of how they work at more than only one level; e.g. most package managers have only "one set" of repos. the system's
<AppAraat>
so uh, what name should I specify in order to install the non-broken rofi?
<samueldr>
AppAraat: you're using nixos, right?
<AppAraat>
no, Ubuntu 15.04
<samueldr>
ah!
<AppAraat>
*16.04
<Myrly-kuri>
I was going to remark "holy rcap, that's old"
<samueldr>
then it's all different
<slabity>
ottidmes: Makes sense.
<samueldr>
Myrly-kuri: 2016 was two years ago!
<AppAraat>
Myrly-kuri: it's still old :p
<ottidmes>
slabity: its more flexible, because you just manage your own checkout so its transparant nixpkgs is just a git checkout, and I have never run into any issue with my channels. So all those issues with nix-channel, they seem like unnecessary to me
<AppAraat>
it's just that 18.04 is having rather interesting issue with not being able to kill PulseAudio, so I'm kinda stuck on 16.04 for now. But that's a different story :p
<samueldr>
AppAraat: I have no (known) solution, but here's the issue that tracked the issue #38991
<Myrly-kuri>
Oh yeah, yesternight I implemented nix-env -iA for emacs.
Ariakenom has joined #nixos
<Myrly-kuri>
It's not terribly useful, but it could help with things you don't want to globally install.
<samueldr>
the overarching issue is how your system has glibc locales for whichever glibc ubuntu 16.04 ships with, and expects them in that format :/
<AppAraat>
samueldr: yeah I did set the $LOCALE_ARCHIVE_2_27 variable to be /nix/store/qhdzv5xc39wjw8n1wdjr37ff6rdl77hh-glibc-locales-2.27 but that didn't work either.
<AppAraat>
oh I see
<samueldr>
as I said, I have no solution (haven't had to deal with that [yet?])
<samueldr>
here nix makes it easy to be faced with the issue, but any kind of package manager on top of another system could have the same issue; so it's not a nix issue (just saying in case); it's all made more annoying in how there's no good solution AFAIK :/
<ottidmes>
AppAraat: you being on Ubuntu explains why the store did not contain a reference to 2.26
<AppAraat>
admittedly I'm not sure what the locale means in this case, but solving this would require to replace the entire glibc of Ubuntu, right?
<Baughn>
Mmyeah.
<samueldr>
"locale" here is the concept of being able to load language files, which is used even for the "default english"
<Baughn>
glibc assumes there's only one instance of itself on the system. That breaks in any situation in which there's, well, not.
<AppAraat>
samueldr: language files in order to being able to present an application in a different language for example?
<samueldr>
right
<AppAraat>
Baughn: is this only a glibc thing or is clang for example also like this ?
<ottidmes>
samueldr: BTW if I were to make a RFC for it, it would probably be to just do away with nix-channels, not replace it with some other tool, why hide the fact its a git repo, and the interactively ask when running the installer where nixpkgs is located and have some default location for people that do not care, and maybe ask what channel to use with a short description saying for when you would want to use one
<ottidmes>
over the other
<Baughn>
AppAraat: I've never seen anything like that for another core library.
<AppAraat>
heh, doesn't sound like a good design choice of glibc then.
<samueldr>
ottidmes: channels aren't "a git repo". nixpkgs being in a git repository is only an implementation detail of how the big nix expression that is nixpkgs and nixos is made
<samueldr>
though yeah, seeing them as you explained is a reasonable lossy representation of channels for most use cases :/
<Baughn>
I have a fever dream of writing a Nix-to-Rust compiler, and attendant interpreter, because it's already taking nearly a minute to evaluate my system expression.
<samueldr>
Baughn: I dare you to do it :)
<Baughn>
It isn't that complicated a language ... ...but...
<ottidmes>
samueldr: sure, channels are a pointing to specific commits of the nixpkgs git repo, but I hope you get my point, hiding this implementation detail seems to do more harm than good if you look at the issues raised on this channel
<Baughn>
Maybe if I just wrote the interpreter. There should be opportunities for parallelization.
<ldlework>
Baughn: wow, I have a pretty big system configuration and it builds in about 6 seconds. Is your configuration available to look over?
<samueldr>
ottidmes: they're not only pointing to specific commits; there are a couple things done when they are prepared and released by hydra, among others pre-baking some values in it like a monotonically increasing version number
Synthetica has quit [Quit: Connection closed for inactivity]
<Church->
Baughn: Hehehehe working on a port of nice to Rust
<Church->
Slowly
<Baughn>
nice?
<Baughn>
As in /bin/nice?
<ldlework>
lol
<Baughn>
➜ nixos git:(master) ✗ time nix build -f machines.nix all --show-trace
<Baughn>
[13 built, 0.0 MiB DL]
<Baughn>
nix build -f machines.nix all --show-trace 75.15s user 1.26s system 271% cpu 28.145 total
<ldlework>
:O
<Baughn>
95% of that happens before any derivations get built at all.
<Church->
Geez
<Church->
Wait there's no parallelization?
<Church->
Wat
<Baughn>
Ther eis.
<Baughn>
See "271% cpu"
<ottidmes>
samueldr: I know... but for the conversation I was having those are irrelevent details
<silver_hook>
Are ADB and Fastboot packaged for NixOS?
<silver_hook>
slabity: That makes sense from the technical PoV, yeah …but it’s not easy to find for the end-user :/
immae has quit [Ping timeout: 240 seconds]
<silver_hook>
Thank you both! I’ll look into this.
<slabity>
silver_hook: You can use nix-locate to find packages easier
<samueldr>
silver_hook: if you were searching using the web interface, I think it's because of how it's part of `androidenv`
<slabity>
,locate adb
<{^_^}>
Found in packages: axis2, oh-my-zsh, androidndk, metasploit, metasploit, bashCompletion, python27Packages.pwntools, python27Packages.pwntools
<samueldr>
silver_hook: it seems like it doesn't recurse in it currently
<samueldr>
,locate
<{^_^}>
Use ,locate <filename> to find packages containing such a file. Powered by nix-index (local installation recommended).
agander_ has joined #nixos
<samueldr>
use `,locate bin` to search for binaries
<slabity>
You can run it locally using nix-index and nix-locate
<samueldr>
since the other will search anywhere
<samueldr>
,locate bin adb
<silver_hook>
Cool, thanks
<{^_^}>
Found in packages: adbfs-rootless
<slabity>
Oh I did not know you can search by filetype
<samueldr>
BUT, the same caveat applies, there's situations where the software won't be found
<samueldr>
like here the `androidenv` thing :/
<samueldr>
(when packages are put into an attrset like that, the different tools need to know about it to recurse into it when making their indexes)
agander has quit [Ping timeout: 250 seconds]
<ottidmes>
Baughn: makes me think, what if Nix was ported to Truffle/Graal and have a specialized JIT just for Nix
<samueldr>
silver_hook: another useful thing to know: if it deals with hardware, look into options first
<obadz>
33
<simpson>
ottidmes: Then eventually we'll all owe Oracle licensing fees.
<samueldr>
silver_hook: since installing only the software can't manipulate rules and the system, only make files available
<ottidmes>
simpson: I thought they were open sourced?
<ottidmes>
simpson: and free for commercial use
<simpson>
ottidmes: Maybe. For now, the core is open, for sure. I don't trust 'em. The API's in Java and I don't trust them to let folks use Java either.
<simpson>
There is RPython, which is a community-maintained JIT toolkit, that is pretty mature. Also there is HolyJIT, which is still very young but shows promise.
agander_ is now known as agander
<ottidmes>
simpson: I dislike Oracle as well (bad experiences with them), but the tech is still very nice, and if care is taken not to create lock in of the specific implementation, I do not see a problem
kisonecat has joined #nixos
<simpson>
The tech isn't *that* nice. It competes with RPython in terms of performance and readability IMO.
betaboon has joined #nixos
<betaboon>
happy nixmas :D
vidbina has quit [Ping timeout: 260 seconds]
justanotheruser has quit [Ping timeout: 250 seconds]
balsoft has quit [Read error: Connection reset by peer]
<ottidmes>
simpson: considering that the time spend in Nix is generally short, it would not be a good fit for Truffle anyway
marsam has joined #nixos
<simpson>
ottidmes: Yep. This is the paradox of interpreters: Sometimes the fastest thing one can do is no transformations.
kisonecat has quit [Ping timeout: 250 seconds]
waif has joined #nixos
<ottidmes>
simpson: I think it was APL, but I read about such examples a long time ago, where the interpreter was able to beat the compiled version, which is not that strange (could just be a bad compiler), but still counter intuitive
marsam has quit [Remote host closed the connection]
<simpson>
ottidmes: We only know intuitively that a compiler removes interpretative overhead; nothing is said about whether an interpreter can pay off its own overhead, if it's equipped with a compiler and the ability to look at itself.
<ottidmes>
simpson: indeed
aleph- has joined #nixos
juhe has quit [Remote host closed the connection]
endformationage has joined #nixos
aleph- has quit [Ping timeout: 272 seconds]
lokado has quit [Quit: Connection closed for inactivity]
sbdchd has joined #nixos
xy2_ has quit [Ping timeout: 268 seconds]
kisonecat has joined #nixos
<Church->
So seems I can't mkdir -p $out/Path/Here/ in the install phase
<ottidmes>
Church-: is this during nix-shell or nix-build? what is the output of echo "'$out'"? could you use some paste service (like GitHub's gists) to post it?
sir_guy_carleton has joined #nixos
<Church->
ottidmes: Nice build
<Church->
And yep, just out shopping. Back in a bit
<ottidmes>
aleph-: from looking at the code, this line is failing: cp -R $src $out/srv/lobster.rs/http/
<aleph->
Yep, that's the one.
<aleph->
Just not sure why, $out is the dir for the package. And I created the path branching off that earlier
jasongrossman has quit [Read error: Connection reset by peer]
<ottidmes>
you made a typo
<ottidmes>
mkdir -p $out/srv/lobste.rs/http
<ottidmes>
$out/srv/lobster.rs/http/
<aleph->
Oh god damnit
<ottidmes>
lobster.rs
<ottidmes>
aleph-: always use a editor that highlights what you select, easy way to spot such typos ;)
<aleph->
Yeah, I have highlighting on too >_>
<aleph->
ottidmes: So I'm getting another error after that.
goibhniu has joined #nixos
<aleph->
/nix/store/l3nz0167a4xhb78ldcjns5p4dwvlm1cw-stdenv/setup: line 1230: /nix/store/28hw8ps4dwjds2djmin88s7m2qad1mml-lobsters/srv/lobste.rs/http/config/unicorn.conf.rb: No such file or directory
periklis has quit [Ping timeout: 250 seconds]
<aleph->
Maybe just cd to the dir and then create the file via heredoc
<ottidmes>
aleph-: cat > $out//srv/lobste.rs/http/config/unicorn.conf.rb (what about the double slash?)
<aleph->
Yeah I removed the double slash
kisonecat has quit [Ping timeout: 246 seconds]
<aleph->
Think I found it, another typo
<aleph->
Ugh. >_>
<aleph->
Okay cool, just need to import rails
<aleph->
ottidmes: Is rails imported via pkgs.ruby?
<aleph->
Okay, think that's solved.
yayforj has joined #nixos
<aleph->
Okay so this is my current and final issue on this I believe. https://paste.rs/QZC
<ottidmes>
aleph-: probably have to set your $HOME to some tmp dir in the build
<aleph->
Gotcha, should I just set it to the nix store path?
<ottidmes>
aleph-: depends, is it something you want to keep
<samueldr>
using the "Basic Usage" section of its README I generally have what I need
<aleph->
samueldr: Yeah I saw bundix, was debating on it. Trying to keep this as a single step however.
<aleph->
ottidmes: So define keep, I guess? Need them to stay in the dir
<ottidmes>
aleph-: samueldr actually uses Ruby, unlike me, so he probably knows best
<samueldr>
bundler won't have network access unless you make a fixed-output derivation once in the build
<aleph->
Ah. So is there any way to include bundix in the nix-build without having to run it before hand?
<samueldr>
I think there is now
<aleph->
That was the one thing making me not want to use.
<aleph->
Oh? Awesome
<samueldr>
I need to re-check something, but I believe if gemset.nix is not given, it will do something?
<aleph->
Kk, I hope so. This 8 month journey can finally end!
<samueldr>
hm, can't seem to figure out why I thought gemset.nix could be omitted
<samueldr>
(quickly)
<fusion809>
I wouldn't suppose someone would know a way to determine the sha256 of a package's source without trying to build it? I would like a way to update sha256 via an easily automated method when I bump the version of Vim in my nixpkgs fork.
<samueldr>
fusion809: nix-prefetch-* tools may help
<Ralith>
rycee: after updating home-manager, none of my user services (redshift, pasystray, blueman-applet, ...) are starting
<vaibhavsagar>
I'm trying to build a project that does tests using the local network in its checkPhase
<vaibhavsagar>
is there a way to make this happen or am I doomed?
<Ralith>
and yes I do have `systemd.user.startServices = true;`
<samueldr>
oh, sorry aleph-, I misremembered: when not given, it will assume gemset.nix is in gemdir :/
<Ralith>
systemctl --user gives `Failed to list units: Process org.freedesktop.systemd1 exited with status 1`
<fusion809>
samueldr: thanks mate! I honestly thought the answer would be along the lines of, "You've just got to deal with the unfortunate reality of your situation!"
<aleph->
Gotcha. samueldr yeah I just realized I can't run bundix -l given that I grab the repo via fetchGit in the default.nix
<Ralith>
even my compositor is gone :/
<samueldr>
aleph-: :/ while I use ruby, I haven't mastered its ecosystem in nixpkgs yet
<samueldr>
(didn't get to really deploy things yet, only develop misc. limited hacks and scripts)
<aleph->
samueldr: Yeah this is trying to deploy a running service. So I can finally replace ansible with nix and nixos
yayforj has quit [Ping timeout: 246 seconds]
<Ralith>
also, current news contains instructions to set a `services.dbus.packages` option that doesn't exist?
<samueldr>
aleph-: maybe there's a way with IFD
yayforj has joined #nixos
<aleph->
IFD?
<aleph->
About ready to just jank up a tiny CI system via shell scripts
<samueldr>
,IFD
<{^_^}>
import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is a problem because it requires evaluating some, building some, and then evaluating the build result.
<samueldr>
within nixpkgs we don't do IFD, don't remember the reason off the top of my head
<samueldr>
but within your own stuff I believe you're free to do it
* aleph-
googles
<aleph->
samueldr: Is there a doc on this?
<aleph->
That is like exactly what I need.
<samueldr>
not sure, it's not "a thing", but a concept on how nix isn't forbidden from importing from the store, AFAIK
<ottidmes>
fusion809: I used this for such purposes in the past: nix-prefetch-url '<nixpkgs>' --attr pkg.src
<samueldr>
so if you have something producing a store path, you could realistically import from it, it would build it first (AFAIUI)
<samueldr>
so you could (maybe?) have a first derivation generating the gemset.nix, and using IFD somehow use it
<{^_^}>
[nixpkgs] @marsam opened pull request #52784 → diskus: enable build on darwin → https://git.io/fhUaC
<samueldr>
(I never had a use case for IFD yet, so I don't have hands-on experience yet)
<fusion809>
ottidmes: where pkg.src is the name of the package, right? And that updates the checksums in the *.nix file belonging to the package?
<aleph->
samueldr: So what sections of the manuals should I read to understand this more?
<aleph->
I'm not that up on the nix language sadly. So I get it but not how
<ottidmes>
fusion809: pkg is for example git, so git.src, and no this would only report the sha, you would still need to update the nix file
<aleph->
how to do it.*
<samueldr>
aleph-: hm, looks like there's no manual section about it
<aleph->
Nope
<samueldr>
aleph-: only the section about the option allowing you to disable it
<aleph->
Think I found a blog post on it.
<ottidmes>
fusion809: but it should be relatively easy to make it automatic with some shell code
<fusion809>
ottidmes: that doesn't work for the packages I've added to my nixpkgs fork, even though they are mentioned in pkgs/top-level/all-packages.nix
<samueldr>
aleph-: though it's not "something" other than the fact that it will use `import` on something built using nix, instead of a path already available
<fusion809>
Like openra-ra2, openra-kknd, etc
<fusion809>
It does for those that were in there before I forked it.
<samueldr>
if you were to `import "${(fetchFromGitHub {...})}/some_file.nix"` AFAIUI it's IFD
<ottidmes>
fusion809: does nixpkgs in NIX_PATH point to your checkout?
<fusion809>
Na, it points to my system channel (/nix/var/nix/profiles/per-user/fusion809/channels/nixpkgs)
<fusion809>
Should, I add $NIXPKGS (that path to nixpkgs fork) to it?
<fusion809>
Adding it, like NIX_PATH=$NIX_PATH:$NIXPKGS has not fixed this issue.
<ottidmes>
fusion809: well it depends on what you want, if you want your system to be build based on your checkout, it really should point to your checkout, but if you do not, you could also just do this: nix-prefetch-url /path/to/checkout --attr pkg.src
<fusion809>
Yep, that's what I'm using, I've been running: nix-prefetch-url $NIXPKGS --attr openra-ura.src, for example ($NIXPKGS is my own variable that points to /path/to/nixpkgs)
<ottidmes>
fusion809: and it still does not find it?
<aleph->
samueldr: Yeah there's like nothing on how to use this anywhere. >_>
<fusion809>
ottidmes: If it helps my fork is at https://github.com/fusion809/nixpkgs, and yeah it doesn't. Maybe it'd be wise to chat privately, as this is crowding this channel a little.
<duairc>
I've tried to do that, but what seems to be happening is that the routes and gateway gets added, but the address (in networking.interfaces.eth0.ipv6.addresses) doesn't get added to the network card
kisonecat has quit [Ping timeout: 246 seconds]
balsoft has quit [Ping timeout: 272 seconds]
abathur has joined #nixos
<duairc>
If I add it manually (ip -6 addr add xxxx:xxxx::1/128 dev eth0) it works, but isn't persistent
therp has joined #nixos
therp has left #nixos [#nixos]
<orbekk>
duairc: sounds like the nic is partially automanaged. if the nic is managed by dhcpcd, maybe you can add the extra address in networking.dhcpcd.runHook instead?
lord| has quit [Read error: Connection reset by peer]
vidbina has joined #nixos
lord| has joined #nixos
<duairc>
orbekk: Yes, I'm using DHCP for IPv4... for now, just because the first time I tried to configure it manually I must have messed something up and lost all connectivity and had to reboot
<duairc>
So I figured I'd just take it one step at a time and get IPv6 working first
<duairc>
But you're saying that the fact that I'm using DHCP for IPv4 means I can't manually configure IPv6?
shabius has quit [Quit: Leaving]
balsoft has joined #nixos
<orbekk>
duairc: sorry, I don't actually know specifically, but I suspect dhcpcd (or something else) is taking some control. usually the way I debug these things on nixos is to look at the generated config
orivej has joined #nixos
<duairc>
orbekk: Where would I find that?
<orbekk>
in /etc and systemctl configs
<orbekk>
e.g., systemctl cat dhcpcd
clefru has joined #nixos
shabius has joined #nixos
agander has quit [Ping timeout: 246 seconds]
<{^_^}>
[nixpkgs] @dywedir merged pull request #52784 → diskus: enable build on darwin → https://git.io/fhUaC
<pie___>
there was some stuff somewhere on how to make ones own package sets?
<pie___>
like language packages or whatever. gonna try to make a bit of progress today on something for WINE
shabius has joined #nixos
tzemanovic has quit [Remote host closed the connection]
balsoft has quit [Ping timeout: 246 seconds]
cyphase has joined #nixos
<duairc>
For what it's worth I expicitly set networking.interfaces.eth0.useDHCP = false and switched to manual addresses for IPv4 and IPv6, and it's the same problem with both
<duairc>
i.e., the routes are being added, but not the addresses
tzemanovic has joined #nixos
tzemanovic has quit [Read error: Connection reset by peer]