alexteves has quit [Remote host closed the connection]
<techieAgnostic>
i have a .nix file that just does callpackage on another derivation, is there an easy way to tell it to have a program from nixpkgs avaliable when i start a shell with that file?
<techieAgnostic>
tried adding it to buildInputs but im getting an anonymous function error
IRCsum has joined #nixos
trcc has joined #nixos
<clever>
techieAgnostic: can you gist your files?
rardiol has left #nixos [#nixos]
MarkRBM has joined #nixos
<JonReed>
techieAgnostic: Not sure what you mean, but I if you want to automatically callPackage with nix-shell, then you can use this alias `alias nix-shell-call='nix-shell -E "with import <nixpkgs> {}; callPackage ./default.nix {}"'
trcc has quit [Ping timeout: 245 seconds]
<techieAgnostic>
oh figured it out, i needed an override for the library
<techieAgnostic>
thank you :)
shabius has quit [Read error: Connection reset by peer]
<techieAgnostic>
my thing needs system imagemagick in the shell environment to run, and I want to be able to keep default.nix as whatever cabal2nix generates, so im trying to get it to have that avaliable in rf.nix for when i `nix-shell --pure rf.nix`
<techieAgnostic>
i got `error: anonymous function at /home/shaun/mess/rf/default.nix:1:1 called with unexpected argument 'imagemagick'` so far
<techieAgnostic>
clever: that worked perfectly, thanks heaps!
<techieAgnostic>
sorry for all the basic questions, im slowly getting there
<clever>
its a bit tricky to inject things into the haskell packages
<techieAgnostic>
in terms of good practice, should i have nix-build avaliable in the nix-shell?
<techieAgnostic>
or does it not really matter?
<clever>
doesnt really matter that much
<clever>
i try to avoid nesting them
<clever>
some people abuse lib.isNixShell to automatically return .env, and nix-build being ran under nix-shell will falsely register as nix-shell, causing nix-build to break
<techieAgnostic>
ahh thats fair
<techieAgnostic>
thanks for all the help :)
sigmundv__ has quit [Ping timeout: 272 seconds]
silver_ has quit [Read error: Connection reset by peer]
witchof0x20 has quit [Remote host closed the connection]
<tnks>
I've been explicitly modifying my applications with `justStaticExecutables`, but I accidentally forgot to in a place, but feel that Nixpkgs did it anyway.
<tnks>
So now I'm confused. Either I'm mistaken, but Nixpkg's Haskell infrastructure is doing some kind of fancy defaulting.
<tnks>
(that I think it wasn't before).
<clever>
tnks: i think the defaults have changed recently
<tnks>
I'm finally updating my example-nix project.
<tnks>
and in the process of documenting things, I'm discover some assumptions I was mistaken about.
JonReed has quit [Quit: Page closed]
<{^_^}>
[nixpkgs] @romildo opened pull request #46022 → deepin-menu: init at 3.3.10 → https://git.io/fA40l
drakonis__ has joined #nixos
<tnks>
is there a recommended way to test if a package is a Haskell, Python, or other?
<tnks>
I'm doing overlays for a DSL, and I'm trying to maybe be too smart... maybe that kind of informaton is too internal.
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #46024 → mkDerivation: Fix cross compilation for 18.09 → https://git.io/fA4zf
drakonis__ has quit [Remote host closed the connection]
lord| has quit [Ping timeout: 246 seconds]
boomshroom has joined #nixos
<boomshroom>
Just got setup at my apartment and did an update. While it's not crashing like the last time I tried updating, Alacritty no longer works and complains that GLSL 3.30 isn't supported.
<tnks>
holy crap, finding packages is so much easier with APT. I need to compile some LaTeX. What's the secret attribute name I need? I can't find it with `nix search`.
<{^_^}>
Found in packages: tetex, texlive.combined.scheme-basic, texlive.combined.scheme-small, texlive.combined.scheme-medium
<srhb>
tnks: nix-index has nix-locate which can search for files in packages. Note however that the texlive environment is a little special because it's parameterized over the packages
<tnks>
srhb: oh yeah, I probably should have looked in the Nixpkgs manual too.
<srhb>
In this example, a minimal setup plus fontspec and geometry
<srhb>
You can explore the texlive attribute to choose your own adventure.
<tnks>
srhb: okay, this gets me started.
<tnks>
thanks.
<srhb>
tnks: Welcome
<joehh>
hello, what is the best way to install packages so all users can run them?
<tnks>
I guess the good part is that what you said was indeed in the Nixpkgs manual.
<joehh>
using nix on an ubuntu box (maybe there is a more relevant channel?)
<Yaniel>
joehh: configuration.nix
<joehh>
Yaniel: :) I wish
<Yaniel>
you asked for the 'best' way :P
<joehh>
I have lots of those boxes, but still need to work with some legacy ones :(
<Yaniel>
on ubuntu... hum
<joehh>
can't fault that
<srhb>
joehh: A shared profile I guess
<joehh>
basically it seems to come down to running /usr/local/etc/profile.d/nix.sh to set some environment variables
<joehh>
but getting those environment vars set in all the ways we could want to execute a nix package file seems challenging
<srhb>
joehh: If you don't want it to be modifiable, I suppose you could link in place eg. root's profile and symlink that in place somewhere everyone can reach it.
<srhb>
(Like /run/current-system on a NixOS)
<joehh>
ie as a user directly, using ssh as a user, using ssh then sudo to root, under supervisord etc
<joehh>
hmmm
<joehh>
no need for it to be modifiable
<joehh>
so I could link it to /usr/local/bin or similar?
<srhb>
More like /usr/local
<srhb>
Or something else entirely
<srhb>
Remember that the profile will have /share /bin etc.
Tucky has joined #nixos
<srhb>
Basically the tree that you see in /run/current-system/sw or ~/.nix-profile
lostman has joined #nixos
<joehh>
awesome! thanks once again srhb :)
<srhb>
Welcome.
<srhb>
In fact it would probably be sensible to nix-env --switch-profile /nix/var/nix/profiles/system
<lostman>
is there anyone here familiar with `callCabal2nix`? I have a weird issue where `cabal build` in a `nix-shell` uses package database from outside nix
<srhb>
And then symlink to that..
<srhb>
lostman: I do
<srhb>
lostman: What are you doing?
<srhb>
Usually we don't use cabal build.
<lostman>
srhb: I have a repo which has bunch of submodules, all Haskell packages and I'm doing `nix-shell -A somePackage --run "cd somePackage && cabal build"`
<srhb>
Where somePackage is callCabal2nix somesubtree?
<lostman>
srhb: yes
<srhb>
lostman: I'm not sure I have enough information entirely, but the way the regular nix build would work is that it uses runhaskell Setup.hs build essentially
<lostman>
I use nix-shell and `cabal build` for development on my laptop and it's convenient in this case to invoke it to run some different builds on CI
<lostman>
with different flags
<srhb>
I doubt it has anything to do with callCabal2nix that cabal is picking up a local packagedb
<srhb>
Did you try running cabal configure in the shell?
<lostman>
I did. that doesn't change anything.
<lostman>
not sure why is it picking up the other package db to begin with. I'd expect `callCabal2nix` to pass `--package-db` argument to only allow the nix package db
<MasseR>
I'm trying to test a function (in a file) in the nix repl, but how can I reimport or re-callPackage the file? Whatever changes I make to the file is not shown in the repl
<srhb>
MasseR: :r
georges-duperon has quit [Ping timeout: 240 seconds]
<MasseR>
Well in the sense that it's the same command than in ghc that I use daily, so ..
<srhb>
Hehe, yeah, sometimes it helps to think "maybe a haskeller wrote this" when dealing with nix tooling ;)
<MasseR>
Somehow I just managed to glance over the command for weeks
ThatDocsLady has quit [Ping timeout: 252 seconds]
<srhb>
lostman: I can't seem to reproduce this. The only idea I have is that somehow you've got a polluted ghc in path in the shell. Can you make a reproducible case?
rauno has joined #nixos
<rauno>
What approach should i take if i need to wrapProgram in nixos module?
<srhb>
rauno: If you don't care to make it accessible for overrides you can just let wrapper = ... in ...
ThatDocsLady has joined #nixos
<rauno>
usecase is that this binary uses env var for its configuration and would like to wrap it when it's enabled and configured via module (not just package install)
<rauno>
hum, okay srhb
<rauno>
will try
<srhb>
If it just needs some env vars set, you can probably get away with setting Environment in the system unit.
<srhb>
kiloreux: Note that I don't need to make any changes to the python package, I just need to override the top level opencv3 attribute that the python package depends on.
<srhb>
(Of course, I also could just make the change to the python package alone)
<srhb>
kiloreux: Do you need an example of that?
<kiloreux>
srhb, Thank you, That sounds like a great idea to solve it. An example would be very much appreciated, especially in the context of the gist I pasted if possible.
eddyb has joined #nixos
baimafeima has joined #nixos
<srhb>
kiloreux: Your gist is too complicated for my taste, but I'm happy to make another overlay example with just the pythonPackages override
<siers>
Can I put https://github.com/siers/nix-gitignore in pkgs/build-support/nix-gitignore? Could I make that directory's default.nix return the imported attrset instead of the path?
<kiloreux>
srhb, that would be great also. Thanks for your time.
<kiloreux>
Something is happening is that both opencv versions are being downloaded now. original 3.2.0 and 3.4.3.
<kiloreux>
Not sure if that's expected behavior.
<srhb>
kiloreux: How do you figure?
mkoenig has joined #nixos
<sphalerite>
siers: I'd think lib/sources.nix might be a better fit?
<sphalerite>
siers: I think a PR would be the best place to get feedback on the idea itself though :)
<srhb>
kiloreux: (Note that my example doesn't override name, so it will still be called opencv-oldversion)
<srhb>
kiloreux: I tried to keep it minimal.
<siers>
sphalerite, not sure what to submit in the pr though
<siers>
but ok, I'll just submit an import in lib/sources.nix and go from there
<kiloreux>
srhb, Thank you so much. I wander why you don't recommend the second approach ?
<siers>
sphalerite, by the way, can you fetchgit in nixpkgs' expressions?
<sphalerite>
siers: builtins.fetchgit? I don't think so
<srhb>
kiloreux: Because what you really want to override is pkgs.opencv3, that is, the dependency pythonPackages.opencv3. If you override it just for pythonPackages, you end up having two distinct versions: pkgs.opencv3 at 3.2.0 and pythonPackages.opencv3 at 3.4.3
<srhb>
kiloreux: I think that's confusing.
<siers>
sphalerite, thanks for the input!
<srhb>
kiloreux: So I think the former approach is definitely preferable.
<kiloreux>
srhb, Makes perfect sense. I will go with your first approach. Can't hank you enough for your time. Spent a good chunk of my time on this issue yesterday. Thank you.
<srhb>
kiloreux: You are welcome :)
hotfuzz_ has joined #nixos
orivej has quit [Ping timeout: 246 seconds]
hotfuzz has quit [Ping timeout: 272 seconds]
orivej has joined #nixos
<{^_^}>
[nixpkgs] @e-user opened pull request #46028 → semodule-utils: init at 2.7 → https://git.io/fA4Po
trcc_ has joined #nixos
sigmundv__ has joined #nixos
trcc has quit [Ping timeout: 240 seconds]
<etu>
Hmm, go 1.11 doesn't seem to run on arm
<etu>
Maybe
<srhb>
etu: I think I saw something related to a GOARM variable
<srhb>
I forgot to look into it
<etu>
srhb: yeah
<{^_^}>
[nixpkgs] @orivej-nixos pushed 3 commits to master: https://git.io/fA4Xm
<etu>
2018/09/04 08:39:55 Invalid GOARM value. Must be 5, 6, or 7.
<srhb>
Right
<etu>
Just produced in with nix shell on my raspberry on latest unstable
<srhb>
I imagine it's a relatively straightforward fix.
<srhb>
Hm, that doesn't seem to touch targetPlatform though..
trcc_ has quit [Remote host closed the connection]
trcc has joined #nixos
aither has joined #nixos
<srhb>
etu: If you have an arm perhaps you can bisect with nix eval nixpkgs.stdenv.targetPlatform.parsed.cpu.version ?
nikivi has quit [Quit: ZNC is awesome]
<srhb>
Hmm, actually not sure how that behaves.
nikivi has joined #nixos
<etu>
srhb: I got the string 8
<etu>
And it's correct that 8 != anything in the range 5-7 as the message said above... Hmm :/
<srhb>
So operating under the assumption that it was 7 until recently, you should be able to bisect it
<bigvalen>
Hmm. I'm trying to disable some prometheus collectors in my configuration.nix at https://gist.github.com/BigValen/7266d80a44a02227f631e844621e1354 - but I'm getting curious errors, that may be scoping problems or somehow I'm pulling in modules twice.
<bigvalen>
Any idea what the error down the bottom might mean ?
jasongrossman has joined #nixos
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyren has joined #nixos
kyren has quit [Client Quit]
kyren has joined #nixos
rauno has quit [Ping timeout: 240 seconds]
<srhb>
etu: Ah, maybe a simpler explanation: buildGoPackage: Use go 1.11 by default Sun aug 26 9336e893eb7f2816707ebe70639268d5ff3e8443
<srhb>
etu: And it looks like Go needs GOARCH for armv8 on go 1.11
<tobiasBora>
I'd like to know, does nix provide some nice ways to compile android packages?
cyris212 has joined #nixos
<flokli>
was switching from nixos-unstable channel to nixos-18.09 (c0bde692f6cd46562b1f4079b9dd645e0f1057ad) recently… for some reason, symlinks inside /etc/static/NetworkManager/VPN (configured using environment.etc from nixos/modules/services/networking/networkmanager.nix) point to paths in my nix store that don't exist anymore, thus breaking all VPN plugins… any idea why these got garbage-collected? A rebuild
<flokli>
also doesn't cause them to rebuild themselves
<flokli>
Funny thing, nm-openconnect-service.name is the only one still existing
lostman has quit [Quit: Connection closed for inactivity]
iyzsong has joined #nixos
carlosdagos has quit [Quit: Connection closed for inactivity]
<kandinski>
I'm trying to update 18.03, and there's an issue with a patch with an http://anonscm.debian.org/ download url. I think I can fix it, but is there any point to patching 18.03?
nikivi has quit [Quit: ZNC is awesome]
<{^_^}>
[nixpkgs] @geistesk opened pull request #46035 → mpv: Added flag for cddaSupport to play Audio CDs → https://git.io/fA4Fr
<srhb>
kandinski: Sure
<srhb>
kandinski: We usually retain official support for about a month after release, and even then there's plenty of people that don't upgrade quite so soon that will be happy that it's fixed.
<srhb>
Well, "official" is a big word. de facto, perhaps.
<kandinski>
srhb: so: I make a local fix, and then make a PR against what? release-18.03?
<{^_^}>
[nixpkgs] @xeji pushed 10 commits to staging-18.09: https://git.io/fA4FA
trcc has quit [Read error: Connection reset by peer]
trcc_ has joined #nixos
<kandinski>
this is the second time I encounter a bug related to retrieving Debian sources.
<kandinski>
Would it make sense to try and clean up all debian.org urls, replace with canonical ones, and write something about picking better ones in the packaging guide?
nikivi has joined #nixos
<{^_^}>
[nixpkgs] @xeji pushed to staging-18.09 « systemd: don't use options from fstab on remount »: https://git.io/fA4bW
<{^_^}>
[nixpkgs] @vcunat pushed 198 commits to staging-next: https://git.io/fA4bg
ArahaelPi has quit [Read error: Connection reset by peer]
trcc_ has quit [Remote host closed the connection]
trcc has joined #nixos
<{^_^}>
[nixops] @AmineChikhaoui pushed to master « get rid of machine configuration state (Up-to-date/Outdated) in regular resources (non machines). »: https://git.io/fA4NO
<kandinski>
srhb: it seems fixed in master. How does one request a backport?
__monty__ has quit [Read error: Connection reset by peer]
<srhb>
kandinski: Why do you need a "channel" in that sense?
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kandinski>
srhb: I want to nix-rebuild my own system on my patched "channel"
<srhb>
kandinski: NIX_PATH=nixpkgs=/path/to/your/checkout should suffice :)
<srhb>
Much easier imo.
<kandinski>
I see, still learning. Thanks.
__monty__ has joined #nixos
<srhb>
kandinski: Sure! :)
ArahaelPi has joined #nixos
<srhb>
But I suspect that method would work fine too
<srhb>
It's very convenient to have NIX_PATH pointed at a checkout for development though.
Mateon1 has quit [Ping timeout: 244 seconds]
<srhb>
kandinski: nixos-rebuild also takes an -I switch which prepends items to the current NIX_PATH, so you can do nixos-rebuild build -I nixpkgs=/path/to/your/checkout
<srhb>
In fact, most of the nix commands do.
<kandinski>
aha, probably what I want to do in general
<srhb>
I think so, yes. :)
<srhb>
Especially if you're switching back and forth.
<{^_^}>
[nixpkgs] @xeji pushed commit from @lschuermann to master « libvmi: fix libxenctrl dynamic loading (#45865) »: https://git.io/fA4AZ
<{^_^}>
[nixops] @AmineChikhaoui pushed to master « move the connection to the libvirtd dameon to another method. »: https://git.io/fA4A4
<kandinski>
srhb: I ran `nixos-rebuild switch -I pkgs=/path/to/checkout` but with the same result. The nixos-rebuild command still just used the channel's version.
<symphorien>
-I nixpkgs=/path/to/checkout
<kandinski>
symphorien: oh. thanks.
<symphorien>
it is the name in nix-channel --list you must use, except for the nixos channel where you must use nixpkgs
<kandinski>
I'm reading the documentation on the CLI switches now. Thanks for your help.
trcc has joined #nixos
Yaniel has quit [Remote host closed the connection]
jtcs has quit [Ping timeout: 252 seconds]
Yaniel has joined #nixos
trcc has quit []
<{^_^}>
[nixpkgs] @romildo opened pull request #46037 → deepin-shortcut-viewer: init at 1.3.5 → https://git.io/fA4pf
mkoenig has quit [Remote host closed the connection]
<lorilan>
Hi, I have a scala build drived by nix. There is a test suite involving `org.joda.time.setCurrentMillisFixed`. The suite works fine if I run it within a nix-shell but fails during a nix-build. I'm not sure how to fix this problem. Is there a nix option that may be in cause ?
<kiloreux>
that line contains a function called "dumpVars". I am not sure why it would be failing here from all different ops I run.
<gchristensen>
yikes, when I plug my Dell dock in to my XPS 9560 on 18.09-beta, nouveau crashes and then my rtkit's canary threads start starving and pulseaudio starts having threads demoted but the computer is not responsive until I force it to shut down.
<gchristensen>
systemd's logger collecting data from boot on is amazing
xok has quit [Quit: Page closed]
<aminechikhaoui>
is there pre-built firefox nightly binaries for NixOS somewhere ?
<aminechikhaoui>
I seem to remember Mozilla uses nix for release mgmt ? do they have a binary cache by any chance
ilikeheaps has quit [Ping timeout: 245 seconds]
IRCsum has quit [Ping timeout: 240 seconds]
ericsagnes has joined #nixos
orivej has quit [Ping timeout: 245 seconds]
<lorilan>
srhb, thx ! I think it was a time zone problem …
tertl3 has quit [Quit: Connection closed for inactivity]
<das_j>
Hey, short question: is there a way to force a set to keep its order?
luigy has joined #nixos
<gchristensen>
no
<das_j>
oh, okay :/
<__monty__>
Why would you need the set to have a specific order?
<gchristensen>
omg I deleted all my user's channels and I can't actually make them go away because nix-channel won't create a new generation
<das_j>
__monty__: I'm currently writing an exim module where I have a set of ACL conditions ({ deny = { condition = "whatever"; message = "my message"; };}), and the message/condition combination is an example where ordering is important
<Phillemann>
I tried pkgs.python3.override { inherit packageOverrides; } and I defined packageOverrides as "self: super: { myPackage = ... } };, but then nix tells me "python.buildPythonApplication" doesn't exist.
<wucke13>
I have trouble when connecting bluetooth sound device. Apparently, the problems do only occur after resume from suspend, not on a fresh boot. Did someone else encounter something similar?
<Phillemann>
(I assigned the result of the override to "python")
<Phillemann>
Oh, its python.pkgs.buildPythonApplication, okay.
sbdchd has joined #nixos
<srhb>
Phillemann: You should probably be using self.buildPythonApplication :)
<srhb>
assuming that refers to the finished set.
sbdchd_ has joined #nixos
justanotheruser has quit [Ping timeout: 272 seconds]
sbdchd has quit [Ping timeout: 240 seconds]
<Phillemann>
Okay, next problem. The application I'm building has tests, so I don't doCheck = false; However, nix-build seems to try to start the application, passing "test" as a parameter.
sbdchd_ has quit [Ping timeout: 244 seconds]
<Phillemann>
Shouldn't it run "make test" or "pytest"?
<srhb>
I suppose it depends on the test framework... You can override checkPhase if need be, but if the python builder is doing this by default, I suspect there's a better way to go about it (unfortunately I know little about the python ecosystem)
joebobjoe has joined #nixos
<Phillemann>
Hm, yes, there are a few (python) packages that override checkPhase.
das_j has quit [Quit: "Bye!";]
das_j has joined #nixos
<joebobjoe>
can I install a package (e.g., netmap) with the nix command?
<srhb>
There's a big difference between a pythonApplication and a pythonPackage, I suspect.
<das_j>
yay, looks like identd works :)
<joebobjoe>
would I use nix add-to-store ?
<srhb>
joebobjoe: No. Use nix-env for now.
iyzsong has quit [Read error: Connection reset by peer]
<joebobjoe>
srhb: for now? it will be added to nix in the future?
<joebobjoe>
whenever I use nix-env it is slow... but someone told me to use -A?
<srhb>
joebobjoe: I don't know whether it will be. But for now, nix-env is the way to go. :)
<srhb>
joebobjoe: Yes, always use -i with -A and specify the attribute path
<joebobjoe>
what does nix add-to-store do then?
<srhb>
joebobjoe: Otherwise it will have to evaluate the whole top level attrset.
<__monty__>
I think I've heard people regret it was ever possible. They want everything to be declarative.
<srhb>
joebobjoe: It adds a path to the store.
<joebobjoe>
like, a path in the filesystem?
<srhb>
joebobjoe: echo test > foo && nix add-to-store foo
<srhb>
Yep, exactly.
<{^_^}>
[nixpkgs] @dasJ opened pull request #46040 → nullidentdmod: Init at 1.3 → https://git.io/fABm8
<avn>
srhb: If I know right -- pythonApplication wrap $out/bin with PYTHONPATH and other stuff
<srhb>
avn: That sounds right. But I don't know if it has other implications re. testing of a module vs. an application
ihar has joined #nixos
<joebobjoe>
srhb: why would doing important things with nix-env, e.g., nix-env -i ever be possible without -A being specified?
<joebobjoe>
what does nix-env do in the case of an ambiguous name/path
<srhb>
joebobjoe: Surprising and weird stuff. With the benefit of hindsight, it probably shouldn't be possible.
<joebobjoe>
and, why does nix-env -qP output the same thing as nix-env -q except with a number in the first column of the output
<joebobjoe>
I do not see any "paths" printed
<srhb>
joebobjoe: nix-env -qaP
<joebobjoe>
ok, now I see the paths printed. how come I didn't see the paths when I only listed installed packages?
<srhb>
joebobjoe: There's no correspondence from path to attribute, only from attribute to path.
<joebobjoe>
huh?
<joebobjoe>
they are different things?
<srhb>
joebobjoe: Once something is installed, there is no way to go back and find the attribute from whence it came.
<srhb>
joebobjoe: Sorry, i used "path" to refer to attribute and store path in the same sentence, hence the confusion
<joebobjoe>
wait hold on
<joebobjoe>
now I'm confused
<wpcarro>
Can any users of nix-darwin help me understand its purpose? I just read through the README, but I'm still a bit confused. Is it just a channel that hosts packages compatible for MacOS?
<joebobjoe>
according to the man, --attr-path, -P Print the **attribute path** of the derivation
<elvishjerricco>
wpcarro: It lets you configure macOS in much the same way that you can configure NixOS
<joebobjoe>
apparently, the whole word "attribute path" is a term
<elvishjerricco>
wpcarro: I.e. you get to use Nix to define services, installed packages, config files, etc..
<wpcarro>
elvishjerricco: ah okay that sounds pretty awesome then
humanoyd has joined #nixos
<srhb>
joebobjoe: I don't know what -qP does, but I don't think it's anything sensible, whereas -qaP does as you describe.
<joebobjoe>
srhb: nix-env -qP is the same thing as nix-env -qP --installed
<srhb>
Yes
<joebobjoe>
(--installed is the default)
<srhb>
And I don't think -P does anything sensible there.
<srhb>
Maybe it does and I'm just ignorant of it. :-)
<joebobjoe>
well what is it printing then? what are the numbers haha?
<srhb>
No idea!
<joebobjoe>
can I specify --attr with a number?
Phillemann has left #nixos ["WeeChat 2.2"]
<{^_^}>
[nixpkgs] @nh2 opened pull request #46041 → nix-daemon service: Ensure `ssh` is on PATH. Fixes #46038. → https://git.io/fABYS
<srhb>
joebobjoe: Not that I know.
<{^_^}>
[nixpkgs] @Ma27 opened pull request #46042 → nixos/activation: fix activation script for non-POSIX shells (retry) → https://git.io/fABYb
<__monty__>
joebobjoe: Maybe it's the order in which they were installed?
<elvishjerricco>
I think the numbers correspond to the orderin in ~/.nix-profile/manifest.nix
<elvishjerricco>
Definitely seems to be that way for me
<srhb>
That looks right to me too
<srhb>
Whether that order corresponds to anything interesting, I don't know though..
simukis has quit [Quit: simukis]
<Taneb>
It feels like there's a couple of things here that aren't quite meeting up
<joebobjoe>
srhb: I think I found a possible bug in nix-env
<Taneb>
"nix-env -u --attr 0" complains that something's a list rather than a set, for me
<elvishjerricco>
Taneb: `--attr` will always treat its argument as a string and try to do `whatever.${arg}`
drakonis_ has joined #nixos
<Taneb>
elvishjerricco: I mean, with the "nix-env -qP" mystery
<joebobjoe>
srhb: man nix-env specifies under -q that you can specify --attr/-A
<joebobjoe>
but this is not possible
<joebobjoe>
as far as I can tell. can anyone verify?
<elvishjerricco>
Taneb: Right. So using `--attr` makes it want to get a field from an attrset, but we've determined it's in fact working with a list in the `-qP` case
<srhb>
It's not with -a
<srhb>
joebobjoe: I think that the weirdness in that section only relates to --installed (the default, as you said)
<joebobjoe>
for example, nix-env -q --description --attr nixpkgs.irssi-1.1.1 does not work
<joebobjoe>
srhb: but if you can look up the store path from the attribute path, can't the tool use the attribute path for installed packages, too?
<joebobjoe>
installed derivations* or whatever the terminology is
<srhb>
joebobjoe: It doesn't know, as far as I'm aware, installed package came from $attrpath
<srhb>
joebobjoe: It only knows that $attrpath produces package (named x, out path /nix/store/y)
<srhb>
joebobjoe: Think of it, you could have foo, bar, baz = quux
<joebobjoe>
is there a glossary of terminology somewhere?
<srhb>
joebobjoe: No, but there should be!
<srhb>
nixpkgs manual is a good place to start.
<joebobjoe>
so, "attribute path" and "store path" are the complete phrases that describe two different things
<srhb>
Yes
<srhb>
Attribute path is informal and refers to an attribute in nixpkgs, usually
<srhb>
eg. pkgs.hello
<joebobjoe>
when you say pkgs.hello do you mean nixpkgs.hello ?
<srhb>
Iff your nixpkgs channel is named nixpkgs, yes.
<srhb>
"pkgs" is really the top level name of the nixpkgs repo, which could be whatever you like.
<{^_^}>
[nixpkgs] @vaibhavsagar opened pull request #46043 → all-cabal-hashes: update snapshot to Hackage at 2018-09-04T11:59:40Z → https://git.io/fAB3l
<joebobjoe>
names are not global? every install/user can use their own names?
<srhb>
yes, they can. Or even specify them at the command line.
kiloreux has quit [Quit: Leaving]
<elvishjerricco>
joebobjoe: The name people usually use with nix-env usually comes from the `nix-channel` they have set up
Maxdamantus has quit [Ping timeout: 240 seconds]
__monty__ has quit [Quit: leaving]
Maxdamantus has joined #nixos
<joebobjoe>
elvishjerricco: is nixpkgs the default name? because I never configured nix beyond running the install script
<srhb>
Unless you're on NixOS, in which case it's nixos...
vctr has quit [Ping timeout: 252 seconds]
<joebobjoe>
srhb: so I am trying to get this straight here. I half understand nix and $attrpath. why would a package be named x, but have a store path of /nix/store/y?
<joebobjoe>
and, is a "derivation" exactly the same thing as a "package"?
<joebobjoe>
and is a "store path" always an absolute path? e.g., /nix/store/y? or is it relative to the store? e.g., y?
<qyliss^work>
the store paths I've seen have always been absolute
<joebobjoe>
ok thanks
<joebobjoe>
man nix-env really sucks for a beginner
<gchristensen>
agreed
nwspk has quit [Quit: Quit: *.banana *.split]
Guest1214 has joined #nixos
<srhb>
joebobjoe: Store paths are uniquely determined by all the inputs to the derivation, by hashing them (more or less)
<srhb>
joebobjoe: Changing any character in the name, for instance, will generate a completely different hash
Guest1214 is now known as yorick
<srhb>
joebobjoe: try ls /nix/store | head
erasmas has joined #nixos
<yorick>
I have a buildkite agent that is running nixos-rebuild (actually, nixops deploy to localhost). however, sometimes an upgrade causes the agent to be restarted and then the build gets interrupted
<LnL>
wpcarro: hi :)
<yorick>
I considered restartIfChanged=false on the agent, but that would mean we can't upgrade that
wucke13 has quit [Quit: WeeChat 2.0]
Mateon1 has quit [Ping timeout: 240 seconds]
<yorick>
I considered systemd-run to host the rebuild, but that means the agent gets restarted and the build is considered failed
<yorick>
is there some ExecOnChange that we can use to gracefully restart the agent after the build finishes?
<yorick>
or maybe an execrestart with a long timeout that does not block the build?
halfbit has joined #nixos
<wpcarro>
LnL: hey! excited about nix-darwin
simukis has joined #nixos
<johanot>
yorick: reloadIfChanged ?
Mateon1 has joined #nixos
<yorick>
johanot: and set a custom reload?
<yorick>
ew
Yes_ma`am has joined #nixos
<Yes_ma`am>
Allah іѕ dⲟing
Yes_ma`am has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Yes_ma`am>
suᥒ іѕ ᥒot dοiᥒg Allɑh ⅰs doⅰng
<johanot>
yorick: well yes. That is what ExecReload is meant for.
<yorick>
johanot: no, execreload is meant for config reloads, no?
<joebobjoe>
so the index printed by nix-env -qP is just useless. it cannot be used as an argument for any nix-env command taking --attr/-A ?
<srhb>
joebobjoe: That's what I've been trying to say, yes.
hyper_ch2 has quit [Quit: Page closed]
<joebobjoe>
is nix-env written in c? maybe I should go check out the source code
<joebobjoe>
oh written in cpp?
chessai has quit [Remote host closed the connection]
<cransom>
not long ago, everything in nix was converted to cpp (a few things were still in perl)
<elvishjerricco>
Can't wait for nix-env to be replaced with something in the new `nix` command. nix-env is pretty gross
<gchristensen>
(my take is imperative package management is always gross)
<joebobjoe>
I would have suggested --attr and --attr-path be named --attr and --print-attr
work_ has quit [Quit: Connection closed for inactivity]
nwspk has joined #nixos
<joebobjoe>
gchristensen: using nix-env breaks the safety of nix?
<johanot>
yorick: I asume you talk about some config anyway, because changing the executable would require a non-graceful restart in either case. You can of course disable restartIfChanged and do it manually.
<joebobjoe>
it is just an imperative overlay on the declarative package manager right?
Dedalo has quit [Ping timeout: 245 seconds]
<gchristensen>
joebobjoe: no
<yorick>
johanot: no, graceful restart as in, wait until it's done doing what it's doing now (deploying itself)
<gchristensen>
no, it doesn't break the safety*
<joebobjoe>
so how is it gross?
<joebobjoe>
it feels to just run a command when you need a piece of software idk
<gchristensen>
it is when you exit the safety and comfort of purity and niceness and have to deal with the real world :P
<joebobjoe>
versus editing a file
<joebobjoe>
srhb: so because nix-env will be deprecated some day it is unwise to help contribute to make the man page documentation clearer?
<elvishjerricco>
joebobjoe: With NixOS, you get to write a nix expression that lists all the packages you want to be installed. Whenever you change that nix file, you just run `nixos-rebuild` to sync your system to the state your file declares.
<srhb>
joebobjoe: I don't know that it will (anytime soon) and no I don't think that's unwise at all.
<joebobjoe>
or are there too many edge and corner cases to be able to document without doubling teh size of the man
<elvishjerricco>
That's "declarative", as opposed to the imperative nature of nix-env, which has you mutate state yourself
<johanot>
yorick: if I understand you correctly, I'd say you should either change ExecStop to be "kill app in some sensitive manner", or (evenbetter imho) change the app such that it reacts well to SIGTERM and shuts down gracefully when systemd asks it politely to exit.
<joebobjoe>
elvishjerricco: idk but when you edit the file you are technically mutating it yourself. if the command only theoretically performed editing instructions on that file for you, wouldn't it be doing the same thing you accompolish by editing the file?
<yorick>
johanot: systemd asks it politely to exit and it is exiting, but it is running nixos-rebuild as a child process, so that dies too
<yorick>
and that is bad
<joebobjoe>
srhb: so would documenting what happens when --attr-path is run without -a be an important behavior to describe in the man?
<joebobjoe>
since it is confusing as it is not mentioned
<joebobjoe>
or the fact that --attr does nothing unless -a is specified
<srhb>
joebobjoe: You're probably a better judge of it that I am, been living with that weirdness for too long to assess the impact on new users. :)
<srhb>
joebobjoe: If it's confusing, it warrants at least a note, I feel.
<johanot>
yorick: so ExecStop=my-graceful-stop-script .. or change whatever's running nixos-rebuild to gracefully handle the term signal.
<yorick>
johanot: that would make nixos-rebuild wait until it dies
<joebobjoe>
so nix hashes only the derivation and the derivation inputs, right? it does not hash the build outputs?
<elvishjerricco>
joebobjoe: Right.
<joebobjoe>
so it is up to the maintainers to make sure their builds are reproducible
<elvishjerricco>
It keeps track of the output has in the DB just to verify that your store isn't corrupted, but this isn't semantically relevant
<joebobjoe>
?
<elvishjerricco>
Right
<gchristensen>
you can check a build with --check
<joebobjoe>
check a build? like test it?
<gchristensen>
like check its reproducibility
<joebobjoe>
how does it do that? isn't that imposisble?
<gchristensen>
it builds it again and hashes the output of the original and second build
<joebobjoe>
and compares?
kiloreux has joined #nixos
Fare has joined #nixos
<gchristensen>
right
<joebobjoe>
so it is just a quick check, not a guarantee
<gchristensen>
impossible to guarantee
<kiloreux>
Can I specify `import <nixpkgs>` on every derivative? Or is it only possible at the root ?
<kiloreux>
I want to have more flexibility choosing different nixpkgs tars for every derivative.
jperras has quit [Quit: WeeChat 2.2]
slack1256 has joined #nixos
endformationage has joined #nixos
simukis has quit [Ping timeout: 244 seconds]
IRCsum has joined #nixos
sbdchd has joined #nixos
slack1256 has quit [Ping timeout: 246 seconds]
sbdchd has quit [Ping timeout: 245 seconds]
<gchristensen>
kiloreux: you could, but it might be a bit slow
alexteves has joined #nixos
IRCsum has quit [Ping timeout: 260 seconds]
<clever>
kiloreux: it would be faster to have a single central place, that imports 2 or 3 nixpkgs, then does unstable.callPackage vs pkgs.callPackage
semihonest has joined #nixos
<{^_^}>
[nixpkgs] @mdevlamynck opened pull request #46045 → plasma-applet-volumewin7mixer: init at v23 → https://git.io/fABlx
<globin>
fendor_: although I'm not sure anymore if you could avoid the additional pythonX lines
<globin>
fendor_: AFAIR there were problems without them
polman has joined #nixos
ixxie has joined #nixos
IRCsum has joined #nixos
cyraxjoe has quit [Quit: I'm out!]
cyraxjoe has joined #nixos
<fendor_>
globin, this seems unreasonable, do i have to manually install the python packages? this defines for each package a whole python nix expression?
<globin>
fendor_: jo it just sets the packageOverrides attribute in each version
<globin>
s/jo/no
<gchristensen>
hi globin!
<globin>
o/
<gchristensen>
how are you?
<globin>
fine, just having a lot to do for uni, so not much time for nix(os/pkgs) work
IRCsum has quit [Ping timeout: 246 seconds]
<gchristensen>
understood, life gets crazy busy :) nice to see you!
<fendor_>
that is not the first time i got bit by `nix-env -u`. What was the proposed solution for it?
<globin>
fendor_: what do you want to achieve? and what is your current state?
<fendor_>
globin, currently i want to understand overlays and how to use them
orivej has quit [Ping timeout: 240 seconds]
IRCsum has joined #nixos
<fendor_>
i copied some examples for neovim and r-studio, now i want to change my custom python nix-expression to use overlays as well
<globin>
fendor_: how are you using your overlay right now?
kenshinC1 has joined #nixos
<fendor_>
globin, i dont understand the question, i have an lnl-overlay.nix in `.config/nixpkgs/overlays/`. In there i have some package overrides
<fendor_>
"userPackages"
joebobjoe has quit [Ping timeout: 260 seconds]
<fendor_>
there, it seems, there are being used automatically
<{^_^}>
[nixpkgs] @dtzWill opened pull request #46049 → libreoffice-{fresh,still}: upgrade and clean → https://git.io/fABgI
<globin>
fendor_: ok, so defining the python overrides as in the file in the link above, and then a `nix-shell -p "python3.withPackages (ps: with ps; [ my-first-python-package my-second-python-package ])"` gives you a shell with a python environment with the two new python packages on the PYTHONPATH, does that help you or are you having issues at some other point?
<fendor_>
globin, i'd like to override it for my global python installation
<globin>
fendor_: where does your global python installation come from?
<{^_^}>
[nixpkgs] @dtzWill opened pull request #46050 → liblangtag: bump to CLDR 33.1 unicode data → https://git.io/fABgM
<globin>
fendor_: and how do you use python packages?
stepcut has joined #nixos
<globin>
fendor_: or IOW what do you want to achieve with your overrides for python packages?
<{^_^}>
[nixpkgs] @grahamc closed pull request #45948 → idea: move meta to each package → https://git.io/fAl2M
<fendor_>
before i used a different python expression: https://hastebin.com/ibabapuvoh.js, then i installed that over nix-env -f ~/.config/nixpkgs/python-build.nix
<fendor_>
globin, i want that the global python installation has some packages such as numpy or pandas
grp has joined #nixos
<globin>
fendor_: ah in that case you don't want to override the python packages themselves but probably rather create a new attribute, for example just add `mypython = super.python3.withPackages (ps: with ps; [ pandas numpy ]);` to your overlay and use that
<samueldr>
(for those wondering, adding it to channels is cheap, even if the need for a specific channel for everything is debatable)
{`-`} has joined #nixos
halfbit has quit [Quit: WeeChat 1.9.1]
iviv has joined #nixos
rfold has joined #nixos
semihonest has quit [Ping timeout: 260 seconds]
ilikeheaps has joined #nixos
<ixxie>
well it is kind of nice in the situation when #nixos gets crowded (which does happen quite often)
pluplog has quit [Read error: Connection reset by peer]
stanibanani has joined #nixos
stanibanani has left #nixos [#nixos]
<tobiasBora>
Hello,
<samueldr>
definitely, only peeve I have (and is off-topic for here) with too many channels is they are inherently undiscoverable on IRC, and archives/past conversations aren't natively indexed
<samueldr>
hi tobiasBora!
<tobiasBora>
I'd like to know, where should I include all the stuff related to mounting the /home?
<tobiasBora>
I read that I should not modify hardware-configuration, so it should be in configuration.nix?
<tobiasBora>
hi samueldr ;)
stepcut has quit [Remote host closed the connection]
<Orbstheorem>
Is there something like hoogle, but for nix? x)
stepcut has joined #nixos
<samueldr>
tobiasBora: it should not be modified if you intend to re-run the generation scripts, but uh, it's kinda debatable whether mounts should be in there or not
stepcut has quit [Read error: Connection reset by peer]
<samueldr>
I personally have disregarded that warning, but keep the files under version control
<tobiasBora>
samueldr: ok thank you. I guess the same debate occurs for the swap
<Dezgeg>
there is a flag to nixos-generate-config to not add filesystem entries there
<maurer>
tobiasBora: ext4 doesn't have support for multiple volumes on the same partition
<tobiasBora>
maurer: Why do I need multiple volumes?
<fendor_>
can i somehow debug an overlay? e.g. look at the defined attributes?
<tobiasBora>
I just mean to actually install debian and nixos "in parallel"
<ixxie>
samueldr: yeah its annoying
<maurer>
Multiple volumes make it easy to use a single partition for two OSes. You tell one of them "assemble a pool out of /dev/sda1. Now grab the nixos volume off /dev/sda1"
<maurer>
tobiasBora: OK, perhaps I should ask what you're looking for. I thought you were trying to make all allocation come from a common storage pool
<maurer>
What are you trying to accomplish?
<tobiasBora>
so debian would have the folder /usr, /etc, ... and nix would have /nix basically. And because these two sets of folders are not supposed to overlap, i don't see why I couldn't run nix and debian on the exact same partition
<tobiasBora>
maurer: that's more a general question, not sure it's really usefull, or maybe just to save some space
<symphorien>
nixos needs /etc
<maurer>
Nix populates /etc and /usr/bin/env
<gchristensen>
and /bin/sh
<__monty__>
Also, what about having two systems mess with /boot and systemd?
<tobiasBora>
the idea is that I'd like to try nix, but fore some complex compilations, I'm thinking to keep a debian "not too far"
<gchristensen>
tobiasBora: my recommendation would be to take a good backup and go whole-hog
<__monty__>
tobiasBora: Then why not just run nix on debian?
<maurer>
So, if you just want to try nix, you could try nix-but-not-nixos
<tobiasBora>
symphorien: isn't nix using only /etc/nixos ?
<maurer>
tobiasBora: no, many applications cannot easily be told to look places other than etc
<symphorien>
half my /etc/ is symlinks to the store
<maurer>
tobiasBora: so for those applications, the nixos configuration will generate an /etc/ file
simukis has joined #nixos
<JonReed>
tobiasBora: A lot of /etc/ including /etc/systemd
<tobiasBora>
__monty__: that's already what I do, but I'd like to go to the next step now, full nixos, and debian "in case" ;)
<tobiasBora>
maurer: JonReed Oh ok... I thought that the /etc/ was symlinked also in the /store
<tobiasBora>
well
<tobiasBora>
that the application would actually go into the store to get configurations
<maurer>
Even if /etc was just a symlink to the store, you'd still be hosed
<maurer>
because nixos would need to remove /etc and replace it with a symlink
edwtjo has joined #nixos
<tobiasBora>
maurer: yes, I was just thinking that nix was not using /etc *at all*. So my idea is stupid
<tobiasBora>
Thank you!
<tobiasBora>
Also, my install just failed with this error:
<tobiasBora>
Failed to move "/boot/loader/loader.conf" into place: Operation not permitted
<tobiasBora>
While I'm running it with sudo
<maurer>
In any case, I _did_ perform a single-partition dual boot with nix/gentoo via btrfs. It can be done.
<maurer>
Even with sudo, /boot/loader could be marked immutable
<tobiasBora>
maurer: how different is it from using lvm?
<maurer>
No need to do manual resizing of partitions/filesystems
<maurer>
If you're fine with LVM, just do it
<maurer>
I basically made volumes for nixos, gentoo, and homes
<tobiasBora>
maurer: oh, you mean you really have one partition... I see, that's interesting, and I'll keep it in mind. if you have any ref for later, I'm interested
<maurer>
and on one mounted nixos at /, gentoo at /gentoo, and home at /home
<maurer>
etc.
<maurer>
and then just spun them around
<maurer>
for booting gentoo
orivej has joined #nixos
<tobiasBora>
ok thank you!
<gchristensen>
smart, maurer
<gchristensen>
ooh what happens if you hibernate and swap the roots around before restoring
<tobiasBora>
maurer: what's the solution for /boot/loader/loader.conf
nbardiuk has quit [Ping timeout: 244 seconds]
<maurer>
gchristensen: How would you "swap the roots around" with the computer off? What is mounted where depends on the in-memory state, which is stored in the hibernation
<gchristensen>
(no idea, just a jokey thought :))
<tobiasBora>
and I don't even have this loader.conf file
<maurer>
tobiasBora: Hm, now that I think about it, /boot/loader should not be possible to have immutable, since vfat doesn't support xattrs
<maurer>
You have a partition, mounted vfat, at /boot, and it's mounted rw?
<tobiasBora>
no partition in /boot, but a partition in /mnt/boot in rw:
<tobiasBora>
/dev/sda1 on /mnt/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
<tobiasBora>
(only output of mount | grep boot)
<maurer>
Dunno. I assume the installer chroots into /mnt, but I am lost at this point
<tobiasBora>
maurer: I don't know if it helps, but I'm installing nix from a ubuntu 16.04 live usb
<Ifur>
Introduction is a bit off topic, but born in 82 in a NATO country neighboring Russia, and talents and interest in physics since just before age 11, and not to mention activity on IRC in 98 on IRCnet as zilus among other names, and EFnet as zpiro I'd appreciate printing out the following G+ post and the last post in particular to remove any possible unfortunate false hopes:
<siers>
jtojnar, about link-grammar: should I post a PR with you as the maintainer?
glasserc has joined #nixos
<jtojnar>
siers: feel free
<glasserc>
I'm having trouble building flow 0.80.0. I'm trying to build it using something like this https://dpaste.de/AeNO but it seems to build 0.79.0 (the version in nixpkgs). Am I doing something wrong with overrideAttrs and src?
johanot has joined #nixos
<fendor_>
can i use in overlays different channels? e.g. unstable and stable to install packages from different channels?
<qyliss>
Can I make a slight change to my console keymap (eg swap caps lock and escape) through NixOS config without having to copy the entire default keymap file for my layout?
<elvishjerricco>
fendor_: What doesn't work about it?
Thra11 has quit [Quit: WeeChat 1.4]
<elvishjerricco>
siers: That's fine to use yourself but it wouldn't be accepted into nixpkgs, as it uses import-from-derivation.
oscarvarto has joined #nixos
<infinisil>
qyliss: yeah through services.xserver.xkbOptions
<qyliss>
I'm not using X though
<siers>
elvishjerricco, I specifically want to get this into nixpkgs
<siers>
how should I go about this? :)
<elvishjerricco>
siers: Well all nix functions available in nixpkgs have to be in-tree.
<infinisil>
qyliss: it might work with i18n.consoleUseXkbConfig
<fendor_>
elvishjerricco, i want to install a package from unstable, but it is not installed from usntable
<elvishjerricco>
fendor_: You have to reference the package as `pkgs.unstable.foo` instead of `pkgs.foo`.
<infinisil>
qyliss: that option uses the server.xserver options for the console keymap
<siers>
elvishjerricco, Then I should make a PR that includes this verbatim?
<fendor_>
elvishjerricco, in an overlay?
<elvishjerricco>
siers: It'd have to move the source for `nix-gitignore` into nixpkgs.
<elvishjerricco>
fendor_: Wherever you have `pkgs.foo` being installed, presumably in `environment.systemPackages = [ ... ];`, you need to reference `pkgs.unstable.foo` instead of `pkgs.foo`.
<{^_^}>
[nixpkgs] @xeji pushed commit from @symphorien to master « sound-juicer: fix build (#46051) »: https://git.io/fABM5
<elvishjerricco>
If your systemPackages is written like `environment.systemPackages = with pkgs; [ foo ... ];`, then you'd need `environment.systemPackages = with pkgs; [ unstable.foo ...];`
<Myrl-saki>
Not sure if this statement is welcome here, but TIL: Apt can build from source.
<Myrl-saki>
Still prefer Nix though.
<drakonis_>
yar it can do all of those things
<oscarvarto>
phry, I tried to use it with the instructions from github. THANKS FOR ANWSWERING!
phreedom has quit [Ping timeout: 256 seconds]
<phry>
oscarvarto: it has no real 'deinstallation', but you can loog at `home-manager generations`. Take the path from the latest generation and look at the 'activate' script in there. That contains steps to always deactivate the generation before. So removing all the activation parts and switching the generation number one up in there should deinstall it
<fendor_>
elvishjerricco, there is no error message and `foo = self.unstable.foo;` does not work either
<elvishjerricco>
fendor_: I don't understand. If there's no error message, then what's not working?
<oscarvarto>
phry, OK. Let me try it
<phry>
this is very vague but the best I can help you. For everything, I guess rycee can help you better. Usually he's in chat here, but not right now. You might want to try it another time
<elvishjerricco>
fendor_: Oh are you saying it's just getting the version from stable instead of unstable?
<elvishjerricco>
Have you confirmed that the unstable channel actually has a newer version of the package?
<fendor_>
elvishjerricco, yes
<elvishjerricco>
Maybe your `nix-env` environment has a different version installed overtop your system environment?
<fendor_>
no, currently not
<elvishjerricco>
What package are you trying to update from unstable?
<elvishjerricco>
nixos-rebuild looks for root's overlays files, not your user's
<elvishjerricco>
sudo nixos-rebuild does, anyway
<fendor_>
elvishjerricco, i think you are right..
<fendor_>
i have an idea
<gchristensen>
I just did some quick mental math, and I'm pretty sure that we're well over $1M USD/yr is being spent on people hired primarily to work on Nix things at companies.
phreedom_ has quit [Remote host closed the connection]
phreedom has joined #nixos
<fendor_>
which automatically updates packages, but i want some packages from unstable and i am struggling to define it in a smart way
<elvishjerricco>
fendor_: Is this for NixOS or just plain Nix?
<fendor_>
elvishjerricco, nixos
<elvishjerricco>
Then why do you want this `nix-rebuild` tool when you have `nixos-rebuild`?
<fendor_>
nixos-rebuild is for system updates, isnt it? and global packages
<elvishjerricco>
Sure. So you just want a user-only environment?
<elvishjerricco>
fendor_: So then above userPackages, put `unstable = import <unstable> {};`, and within userPackages, put `stack = self.unstable.stack;`
<LnL>
fendor_: that will use the system nixpkgs, if you want to pull in something else you have to add a separate channel and import it from there instead of self/super
sbdchd has joined #nixos
<Neo-->
i'm trying to modify one of options.programs from my git clone but I have a hard time getting nixos to grab local git repo - usually I just specify pkgs-dev = import path/to/repo and then in system packages pkgs-dev."package name" but for options I didn't yet found a way to get it to work... any ideas?
<fendor_>
elvishjerricco, but i dont want to use the global configuration file?
<fendor_>
LnL, how can i import it correctly?
<elvishjerricco>
fendor_: Yea. I was just making sure nixos-rebuild wasn't what you really wanted
<elvishjerricco>
So your overlays thing is fine
<elvishjerricco>
And your `unstable = import <unstable> {};` thing was also the right approach
<elvishjerricco>
So in your overlay file, make the changes I suggested
<fendor_>
LnL, does it only install from system channels?
<LnL>
system channels?
<gchristensen>
Neo--: certainly some SF salaries but not all, and sure, 5-15 people is probably a reasonable(, maybe low) estimate
<rain1>
i haven't been able to make the xrandrHeads variable pick the right resolution for one of my screens. I have to use the xrandr tool in the command line after logging in. I tried monitorConfig https://nixos.org/nixos/options.html#xrandr - anyway, can people please pastebin some examples of xrandrHeads being used in nix config? i don't find many on google
<fendor_>
LnL, I thought, that if i install channels with sudo, that they will be used by the root?
<fendor_>
elvishjerricco, problem seems to be that i use a channel that hasnt not been installed with sudo
<LnL>
fendor_: ah no, the default NIX_PATH on nixos doesn't look at user channels
<elvishjerricco>
LnL: It doesn't? That's dumb...
<LnL>
only the nix-env command does
<elvishjerricco>
I thought the evaluator did too
<elvishjerricco>
I thought it was only the new-style commands that didn't
<oscarvarto>
phry, I changed programs.home-manager.enable = true; to programs.home-manager.enable = false; then home-manager switch and the thing has gone
<gchristensen>
elvishjerricco: it is dumb. I tried to change it, but the change is not right.
<fendor_>
LnL, why dont they? 0.o this seems counter intuitive
<LnL>
don't shoot the messenger :p
<oscarvarto>
phry, I am starting with Nixos, Nix, and I bet it will be useful for me in the future, once I have managed the basics with the manuals only
<elvishjerricco>
LnL: Eval totally does get them though
<fendor_>
LnL, i am just curious. Also i am jsut really struggling to understand how nixos works things out
<elvishjerricco>
`nix eval '(<foo>)'` is picking up the user `foo` channel
<gchristensen>
elvishjerricco: echo $NIX_PATH ?
<LnL>
elvishjerricco: not by default
<elvishjerricco>
Oh is `/home/$USER/.nix-defexpr/channels` not in the NIX_PATH by default?
<elvishjerricco>
I guess I may have added that manually
<gchristensen>
it is in nixos-18.09 and nixos-unstable, but in a way which breaks some use cases and should be reverted
<Neo-->
gchristensen, what's your estimate then? 25?
<elvishjerricco>
Uh oh...
<LnL>
gchristensen: huh?
<fendor_>
would it make sense to add `/home/$USER/.nix-defexpr/channels` to NIX_PATH?
<{^_^}>
#40165 (by wizzup, 17 weeks ago, open): warning: Nix search path entry '$HOME/.nix-defexpr/channels' does not exist, ignoring
<{^_^}>
#45400 (by dtzWill, 2 weeks ago, open): NIX_PATH: don't prepend $HOME-based value in session variable, set later
<LnL>
I think so, but aparently not always?
* qyliss
daydreams about a primarily-Nix job
<phry>
oscarvarto: that's an even cleaner solution :) and yes, everything at once can be a bit much. after a while, home-manager is great but i wouldn't use it from the start
<gchristensen>
Neo--: not sure, but note I'm not counting people who _use_ Nix (which I'm sure is in the 10s to 100s millions/yr) but whose primary work output is Nix code or for the Nix ecosystem
<oscarvarto>
Thanks a lot for helping me. I was going nuts
<fendor_>
well thanks for the help guys. now i declaratively install my user packages :)
<LnL>
gchristensen: :(
<gchristensen>
LnL: yeah :(
<LnL>
gchristensen: with that second approach we could make adding the user entries optional if they exist
winem_ has joined #nixos
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
_ris has joined #nixos
winem_ has quit [Ping timeout: 240 seconds]
stepcut has quit [Ping timeout: 245 seconds]
<LnL>
oh, samueldr beat me to it
<mog>
i am installing a specific version of a package by using mkDerivation. and it would work but the preBuild script that is called fails because a file is no longer there in the newer version of the package. is there a way i can overrid the preBuild or do something before the preBuild so I can just touch the file in question
<{^_^}>
[nixpkgs] @xeji pushed commit from @dtzWill to staging « sudo: 1.8.24 -> 1.8.25 (#46057) »: https://git.io/fABxS
taktoa has joined #nixos
sigmundv has joined #nixos
<{^_^}>
[nixpkgs] @azazel75 opened pull request #46068 → Prometheus Alertmanager: Allow the definition of extra options on commandline → https://git.io/fABxF
<taktoa>
does anyone know if there's any work on LLVM 7 for nixpkgs
<oscarvarto>
But don't know if that applies to NixOS as well
<justan0theruser>
what is the secure way to store a username/password combo in nixos
<justan0theruser>
that my configuration.nix depends on
krav1 has joined #nixos
Fare has quit [Ping timeout: 260 seconds]
Denommus has quit [Remote host closed the connection]
<JonReed>
justan0theruser: You can just read them from any file, the choose to secure the file however you want, even unmounting it between builds
<elvishjerricco>
Aw. `nix build -f "<nixpkgs/nixos>" --arg configuration ./myservice.nix config.system.build.manual.manpages` doesn't seem to build a version of the man pages that includes my service's description. That's surprising.
{^_^} has quit [Remote host closed the connection]
<justan0theruser>
JonReed: is there a standard place for this
{^_^} has joined #nixos
mayhewluke has quit [Ping timeout: 246 seconds]
mayhewluke has joined #nixos
worldofpeace has quit [Quit: worldofpeace]
dbmikus has joined #nixos
rprije has joined #nixos
<JonReed>
justan0theruser: I don't think so. It depends against what you're trying to secure those passwords. Against user peeking in? Then you can just store files at /etc/nixox and give only root permission to read them
<{^_^}>
[nixpkgs] @qolii opened pull request #46072 → pyopenssl: Disable some tests, for libressl support. → https://git.io/fARLG
<JonReed>
justan0theruser: I personally have /etc/nixos/private directiory where I store everything I don't want to leak. I then do `let private = import ./private/vars.nix {} in rec { .. restOFconfiguration.. }` and access vars like `private.pasword`.
<JonReed>
I gitignore that directory and set other permissions to it
<justan0theruser>
JonReed: good idea, thanks
<ldlework>
JonReed: you can do self: super: { private = import /etc/nixos/private; } too I think
<ldlework>
My error reads: collision between `/nix/store/g3ph21n8brri9d1yd2rl0mxscdd4rwlb-gh-repos' and `'
<justan0theruser>
JonReed: do these passwords end up in /nix/store
<ldlework>
please ignore the naming typo writeSubbedBin -> writeSubbedBin2