<dash>
slabity: the whole point of nix configuration is that the system doesn't change until the config file changes.
<slabity>
Unless there's a way to call that in configuration.nix?
<slabity>
dash: I know that, but I'd prefer not needing to update the hash every time the upstream changes.
<dash>
slabity: use nix-prefetch-git to get the sha256
<slabity>
I know it's not the best idea, but I don't suppose there's a way to fetchFromGitHub the HEAD and ignore the sha256?
<slabity>
Can you make a derivation for an overlay? And then use the derivations in that overlay?
<slabity>
It sounds like it to me, but I'm not making any assumptions on the specific issue
<slabity>
LnL: I'm not sure. I don't really know how zsh plugins work in the background. But I do know that if I don't call compinit manually then I don't get tab completion for `nix-env -iA nixos.<TAB>`
<pbogdan>
slabity: I don't but here are zsh-related bits in case that helps http://dpaste.com/2QR7H4W I'm using that on 17.03
<olejorgenb[m]>
slabity: poke me if following pbogdan advice doesn't work (I co-maintain nix-zsh-completions)
<slabity>
pbogdan: I don't suppose you have your configuration.nix publicly, do you?
<pbogdan>
slabity: IIRC I needed zsh-completions and nix-zsh-completions packages and "programs.zsh.enableCompletion = true;", other than that not sure :/
<gchristensen>
slabity: hrmm sorry not sure :/
<slabity>
gchristensen: I have that enabled. But still no tab-completion for nix-env
<slabity>
So I use to have zsh tab-completion for nix-env packages, but not anymore. Does anyone else get completion when they do `nix-env -iA nixos.<tab>`? If so, how do you set that up?
<slabity>
That's annoyingly inconsistent
<slabity>
Same with jack, libparted, libpci... But not libfl? And that's the norm?
<slabity>
What determines when one library is available to pkgconfig in a nix-shell and another isn't?
<slabity>
But when I do `nix-shell -p libdrm pkgconfig`, I can definitely link to libdrm. Why is this so different?
<dash>
slabity: Sure. You do "nix-shell -A thing_youre_developing.nix"
<slabity>
So... What's the recommended way of developing with libraries then? I thought that was the whole point of nix-shell
<joepie91>
slabity: right, nix-shell does not expose the libraries into the environment
<slabity>
joepie91: For some reason I can't link to it. I'm in a `nix-shell -p flex bison pkgconfig` environment, and `pkgconfig --listall` doesn't show it
<joepie91>
slabity: it's definitely in the `flex` package
2017-08-23
<slabity>
Does anyone know what package libfl is in? I can't seem to find it, but flex is definitely in the repos
<slabity>
When I enter a nix-shell and try and run emacsclient, I get a "can't find socket" error. Anyone know of a solution to allow a nix-shell to connect to my session's emacs server?
2017-08-20
<joepie91>
slabity: thaaaat sounds like a bug :)
<slabity>
/znc detach #nixos
<slabity>
Thanks everyone... I'm not sure what the problem was, but it's working now.
<slabity>
Adding python36Full back into systemPackages sets python3 as the default interpreter now.
<slabity>
Welp. Looks like rebooting worked for some reason. I now have no python in my PATH
<slabity>
v0id: I suppose it's worth a shot. Let me just reboot and make sure my current generation works fine booting
<v0|d>
slabity: gc'd already?
<joepie91>
slabity: very odd.
<slabity>
joepie91: I cannot figure out why python2 is installed at all. I've even erased all packages installed with nix-env
<joepie91>
slabity: you might also have installed it imperatively at some point?
<slabity>
joepie91: I can guarantee it's not in systemPackages though
<joepie91>
cc slabity
<simpson>
slabity: Also, I forgot to pass `--pure` to nix-shell, which does make it all work.
<simpson>
slabity: You have neatly-factored configuration and probably not several years of bad decisions. Anyway, don't worry about it.
<simpson>
slabity: Okay! Then your system is more clean than mine. Nice. Anyway, yeah, either be in a nix-shell with python3, or don't have Python at all in systemPackages. Personally, I recommend learning nix-shell, as it makes developing with Nix easier.
<slabity>
simpson: It runs python 3.6.2 when I run that command
<slabity>
joepie91: Well then that is very strange, because I'm quite certain it's that way for every dependency on my entire system.
<joepie91>
slabity: there's no "global environment" on NixOS, so if something is merely a dependency of something else, it shouldn't show up in your virtual user env
<joepie91>
slabity: yeah, but that shouldn't affect what's on your PATH
<simpson>
joepie91, slabity: Huh, this is strange; can y'all check the output of $(nix-shell -p python3 --run 'which python')?
<slabity>
joepie91: I believe it's a dependency for libvirt, which is part of my system.
<joepie91>
slabity: but is there a Python2 in your systemPackages?
<simpson>
slabity: I'd personally use systemPackages less and use a bash alias.
<slabity>
joepie91: I'm fine with having a python2 interpreter, but I want the `python` program in my path to point to `python3`, and I'm looking to do so in my nix configuration
<slabity>
joepie91: "completely unrelated" ... "not sure whether this is typical" Lol sounds pretty related
<joepie91>
slabity: the problem is that there's a Python 2 in your PATH even though you didn't put it into systemPackages?
<joepie91>
slabity: ah, hold on, I might have misunderstood the problem
<slabity>
simpson: I'm not looking to build python 2 packages with python 3. I'm perfectly fine with python 2 being installed and used by packages that require it.
<simpson>
slabity: You can install from python3Packages instead of pythonPackages, overriding any packages which claim to not be compatible with Python 3.
<slabity>
Well let's just say I really want to screw up my system and link python -> python3
<joepie91>
slabity: it's... probably technically possible, but a bad idea
<slabity>
simpson: It's my understanding that you can override any variable in nix and nixpkgs. Are you sure it's not possible?
<simpson>
slabity: No, you should go with the standard Python solution of `python3` if you want a Python 3.
<slabity>
simpson: So there's no way to tell nix, "Hey, instead of linking `python` to python2, link it to python3`
<slabity>
simpson: Well I know `environment.systemPackages` contains python36Full. I don't know where the default python is coming from
<simpson>
slabity: Okay. Nix doesn't work this way. How did you get your `python` command in the first place?
<slabity>
simpson: I want to set the default python interpreter to python3 system-wide. So when I run `python` it doesn't run 2.7
<simpson>
slabity: No, I mean installing stuff from python3Packages instead of pythonPackages. What's your overall goal?
<slabity>
simpson: Do you mean set `pkgs.pythonPackages = pkgs.python3Packages`?
<simpson>
slabity: Use python3Packages instead of pythonPackages.
<slabity>
How can I set the default python interpreter to python3?
2017-07-30
<slabity>
yegortimoshenko: Running `nix-shell -p libinput` doesn't provide you with any libinput-* executables?
<slabity>
And it does not support anything except ELF files
<slabity>
According to #winehq, wine-preloader loads it to better control memory layout
<clever>
slabity: thats just how wrapProgram works on nixos, we would need to confirm if wine is trying to dlopen wine64 directly, or if its just executing wine64 as a normal app
<slabity>
Is that a bug?
<slabity>
So the #winehq people are saying that wine64 needs to be an ELF file, but nixos makes it a bash script that executes .wine64-wrapped, which is the actual ELF file
<clever>
slabity: you may need to look into the wine docs or ask #winehq
<slabity>
clever: I can run 32-bit applications if I set WINEARCH=win32, but it won't work in a dual-prefix
<slabity>
clever: But I set wine.build = "wineWow", so shouldn't it install both?
<clever>
slabity: i suspect that might be a 64bit only wine
<pie_>
slabity, well what does the error code mean? :P
<slabity>
So wine-wow just finished installing, but I can't get it to run any 32-bit applications "Err 1359". Is there something else I need to do to my nix config?
2017-07-29
<slabity>
Probably will take a while to compile
<slabity>
clever: Thanks, I'll check to see if it works.
<clever>
slabity: i have used wine.override { wineBuild = "wineWow"; }; before
<clever>
slabity: one sec
<slabity>
Does anyone know how to enable WoW in wine on NixOS?
2017-07-13
<slabity>
That's actually kind of awesome. Thanks for the help
<slabity>
spacefrogg: Yea, that's what I'm trying to do.
<spacefrogg>
slabity: That is not, how nix works. What do you want to achieve? A build environment for some package you develop?
<slabity>
I have libdrm and pkgconfig installed
<slabity>
So I can run 'nix-shell -p libdrm pkgconfig' and then run `pkg-config libdrm --cflags` successfully, but I can't run it outside of the nix-shell. Any explanation?
<dtzWill>
slabity: but for one-off you should just be able to use nix-shell -p and it'll be on the cc's include path
<dtzWill>
slabity: for dev I often create a dummy deriv with the dependencies as buildInputs and nix-shell into that...
<slabity>
gchristensen: Yea, but I kind of wish I would remember the basics of making a proper build script
<slabity>
I guess I'll patch my project to use pkgconfig
<gchristensen>
slabity: mistakes are cyclical
<slabity>
I'm making the same mistakes I've made 10 years ago.
<slabity>
How did I forget pkgconfig exists
<slabity>
Oh my god I'm dumb
<bennofs>
slabity: but you shouldn't need to supply that path manually, nix-shell -p libdrm pkgconfig gcc autoconf automake should normally work for C/C++ programs
<bennofs>
slabity: getting that path is easy: nix-build --no-out-link '<nixpkgs>' -A libdrm should print it
<slabity>
My impression right now is that I need to write a full derivation for development, which seems very unnecessary
<slabity>
bennofs: I'm not asking to write to /usr/include, but rather getting the path to ${libdrm}/include/drm or however it works
<bennofs>
slabity: so it cannot write anything to /usr/include
<bennofs>
slabity: nix-shell doesn't change your filesystem (it is not a chroot)
<slabity>
So there's no proper way of getting the includes necessary just in the shell?
<slabity>
My build is almost pure rust, but it calls a clang command
<slabity>
So if I want to compile something I need to generate a .nix file?
<slabity>
What's the recommended way of compiling a program that requires a header in /usr/include?
2017-07-08
<slabity>
This might be a long shot, but does anyone know how to get a package path in emacs with nixos layer?
<simpson>
slabity: To pick what `pythonPackages` will point to? Not AFAIK.
<slabity>
Is there a way to select a specific python version as the default?
<slabity>
Okay, so for some reason gcc6 automatically creates the cc link, but not gcc5. I
<slabity>
On other systems I would just change the symlink, but I'd like to know what way to do that in nix would be
<slabity>
So I have gcc and clang installed. Is there some way to choose which one `cc` links to?
2017-07-07
<Sonarpulse>
slabity: there is the nixpkgs and nixos manuals within the nixpkgs repo
<slabity>
So there's no nixos wiki, right? Is there a place I can help with documentation?
2017-07-05
<sphalerite[m]>
slabity: so I keep an expression which I install using nix-env -ir whenever I've modified it or updated nixpkgs
<sphalerite[m]>
slabity: it's a matter of personal preference. I personally manage my software declaratively but install it only for my user apart from systemwide services and keep the system config to a minimum
<slabity>
How do you decide whether to install something with `environment.systemPackages` or as just `nix-env -i`
2017-06-27
<slabity>
Nevermind, it appears to be working now.
<slabity>
So I have "nixpkgs.config.firefox.enableAdobeFlash = true;" in my config, but I don't have flash installed in firefox. How do you install flash in nixos?
2017-06-24
<slabity>
clever: So if they're in my store, I won't need to download them? I can just use "nix-env -i <version>" to swap them?
<slabity>
Oh. That's disappointing.
<slabity>
So I can't install both at once?
<clever>
slabity: if you used the fixed version of line 13, and delete line 20, then you can use mozillaPkgs.foo to refer to the version of foo in the overlay
<slabity>
clever: They're both from the same overlay: rustChannels.nightly.rust and rustChannels.stable.rust
<clever>
slabity: if you put the overlay in nixpkgs.overlays, then the main pkgs on line 1 will contain the overlays, and you have no way to not use them
<slabity>
clever: So let's say I have two different versions of a program installed (the nightly and the stable), how can I switch between the two?
<clever>
slabity: the default.nix loads a specific version of nixpkgs, and applies the overlay to it for you
<slabity>
clever: Oh, well it works on the mozillaOverlay too
<clever>
slabity: nothing in my gist refers to mozillaOverlay or default.nix, so both can be removed
<slabity>
clever: So my question, is why do I need `mozillaOverlay = "${mozillaPkgs}/default.nix";`. Why do I need the default.nix?
<clever>
slabity: yep
<slabity>
clever: Hey, it works! Thanks for your help.
<slabity>
Ooh. I think it's working
<slabity>
Oh, I guess not
<slabity>
Then I can do the import for the mozillaOverlay
<slabity>
Oh, I see
<clever>
slabity: adding import now puts the function in that variable, rather then the path
<slabity>
The option value `nixpkgs.overlays.[definition 1-entry 1]' in `/etc/nixos/packages.nix' is not a nixpkgs overlay.
<slabity>
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:337:32, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:337:19:
<clever>
slabity: does that error give a line number?
<slabity>
clever: it's saying rustOverlay isn't a nixpkgs overlay
<clever>
slabity: refresh the gist
<clever>
slabity: oh right, missed something when switching it around
<clever>
2017-06-22 20:22:37 < clever> slabity_: otherwise, it will have a circular reference, where the value of pkgs depends on the overlays, which depend on pkgs.fetch...
<clever>
2017-06-22 20:22:06 < clever> slabity_: you may need to use (import <nixpkgs>{config={};}).fetchFromGithub
<slabity_>
So I think I found it: `nixpkgs.overlays = [ mozillaOverlay ];`. But that gives an infinite recursion error
<slabity_>
Overlays list?
<slabity_>
Also, the github repo has another overlay, except it's called rust-overlay.nix instead of default.nix. Any way to access that?
<clever>
slabity_: try adding --show-trace, and figure out which file is complaining
<slabity_>
mozilla/nixpkgs-mozilla
<clever>
slabity_: i dont think callPackage is the right thing to use there
<slabity_>
clever: So then after I do the `mozillaPkgs = fetchFromGitHub {...}'` and the `mozillaOverlay = pkgs.callPackage mozillaPkgs {};` how do I access a package in that repo? When I try mozillaOverlay.firefox-nightly-bin it gives me an error that an anonymous function was called with an unexpected argument 'channel'
<slabity_>
:(
<clever>
slabity_: and the H in Hub has to be in caps
<slabity_>
clever: It says attribute fetchFromGithub is missing
<clever>
slabity_: otherwise, it will have a circular reference, where the value of pkgs depends on the overlays, which depend on pkgs.fetch...
<clever>
slabity_: you may need to use (import <nixpkgs>{config={};}).fetchFromGithub
<slabity_>
And then I can do something like `mozillaOverlay = pkgs.callPackage mozillaPkgs {};` since it has a default.nix in that repo, right?
<slabity_>
Can I retrieve an overlay via a fetch* command in configuration.nix? For example, the mozilla-overlay: `mozillaPkgs = pkgs.fetchFromGithub { "..." };`
2017-06-15
<slabity>
I don't disagree
<sphalerite>
slabity: they're all just little snippets that would be better off managed by a proper package manager
<slabity>
sphalerite: It's more of a collection of plugins that you can enable and disable. I don't really want to go through each plugin I want and install them separately
<sphalerite>
slabity: why not?
<slabity>
sphalerite: That doesn't sound like a good solution.
<slabity>
I'll look into cleaning that
<slabity>
It would be nice to just say, "theme = 'git://github.com/whatever/themething'"
<slabity>
oh-my-zsh expects themes to be installed in $OH_MY_ZSH/themes or something like that then
<slabity>
Ralith: They come with a bunch of basic built-in ones, but there's a lot that aren't built-in
<slabity>
Ehh, I think it'll work if I just do something disgusting like "../../../../${powerlevel9k}/powerlevel9k"
<slabity>
I mean it's looking for it relative to the ohMyZsh path
<slabity>
Well I just realized that the 'theme' option is looking for a relative path instead of absolute.
<slabity>
Ralith: Why's that?
<slabity>
Ralith: Yea, it's imported from configuration.nix. But your change seems to have fixed it
<slabity>
Ralith: That's what I was told to do... What is it then? Just an expression?
<Ralith>
slabity: your powerlevel9k.nix file is not a nix package
<slabity>
Ralith: That gives me "attempt to call something which is not a function but a set"
<Ralith>
slabity: you introduced a variable named `powerlevel9k`, you haven't touched `pkgs`
<slabity>
Ralith: I am at a loss. I have "let powerlevel9k = pkgs.callPackage ./powerlevel9k.nix {}; in {...}", but when I try to use "${pkgs.powerlevel9k}" it says the attribute is missing.
<slabity>
Ralith: Then what do I do after I make the file?
<slabity>
Ralith: It tells me that attribute does not exist. Are custom packages part of 'pkgs'?
<slabity>
ison111: Yea, I'm trying to figure out how to refer to a package I made myself
<ison111>
slabity: I'm not sure about referring to your own packages, but it's usually something like ${pkgs.PACKAGE_NAME}
<Ralith>
slabity: you can write a string like "${pkgs.powerlevel9k}/share/whatever"
<slabity>
How do I do that?
<slabity>
So I need to set `programs.zsh.ohMyZsh.theme' to "<The package location>/powerlevel9k.zsh-theme"
<slabity>
How do I refer to a file in the package in my configuration.nix file?
<slabity>
iqubic: Then run it in a VM and configure it before you install it on your actual system
<slabity>
iqubic: Sort of. I use subvolumes rather than partitions when it comes to btrfs
<slabity>
Transition is still not done. But once I finish it on my laptop I can throw the config on my desktop and be happy
<slabity>
iqubic: One 16gb pci ssd and one sata 512gb ssd. The smaller one is my esp and swap space, and the other is LUKS with btrfs on it.
<iqubic>
slabity: What was your partitioning scheme like?
<slabity>
iqubic: I switched from gentoo about 3 days ago because I liked the idea of not needing to manage my system's state
<slabity>
iqubic: Then in that case it really doesn't matter what you do. The worst case scenario is that you'd need to try again.
<iqubic>
slabity: No, I wouldn't have.
<slabity>
iqubic: But you probably wouldn't have been set back too much if you messed it up, right?
<slabity>
iqubic: A virtual machine would be a good alternative
<slabity>
Just found out that NixOS has oh-my-zsh as built-in options. That's incredible.
2017-06-12
<slabity_>
Well that was easy. Just had to add pkg.beignet to opengl.extraPackages
<slabity>
clever: Yea, that's why I'm trying to find the list of valid packages for that option
<slabity>
I'd like to try to enable opencl on intel though
<slabity>
I'm switching from gentoo, so it's very different
<slabity>
clever: Just trying to learn how to use nixos and configure my system
<clever>
slabity: what are you trying to do?
<clever>
slabity: everything put int opengl.extraPackages is added to the buildEnv that lands in /run/opengl-driver
<slabity>
Is there someplace that lists valid packages for `listof package` option types? For example, what are valid packages for `hardware.opengl.extraPackages`?
<slabity>
Is there anything earlier than boot.initrd.preDeviceCommands?
<clever>
slabity: currently, there is no way to override modules, you need to clone the entire nixpkgs
<slabity>
clever: Can I override just that particular file? Or do I need to clone the entire nixpkgs repo?
<clever>
slabity: all i can think of is to modify nixpkgs directly, and maybe send a PR upstream so it always does it that way
<slabity>
clever: That's disappointing. Do you know of a better way to make plymouth start before the LUKS password prompt appears?
<clever>
slabity: mkBefore and mkAfter cant easily be overridden, you would need to checkout a clone of nixpkgs on the same revision, and just edit the file directly