<cmcaine[m]>
But when I run that replacing `hello` with something else, it can't find my stuff, and I don't know how I get my file included :/
<mnoronha>
(Sorry if this is double-sending, not sure if my message just now went through)
<mnoronha>
I'm using a shell environment with jupyter, and I installed some packages using pip into a virtualenv that weren't in nixpkgs. The jupyter kernel can't access them, presumably because it's running with the python binary in the nix store, not the one from the virtual environment
<mnoronha>
Is there a solution besides installing jupyter with pip?
drakonis2 has joined #nixos
drakonis_ has quit [Ping timeout: 265 seconds]
<cole-h>
cmcaine[m]: So, `nix-shell '<nixpkgs>' -A hello` looks for the package `hello` in `<nixpkgs>` (which is just a fancy way to refer to where nixpkgs is located). If the package you're trying to debug is not in nixpkgs, that won't work.
leo60228 has quit [Remote host closed the connection]
<cmcaine[m]>
cole-h: yup, I get that, but I don't know how I get that to work with, say, a blah.nix I've written.
<cmcaine[m]>
cole-h: Yes, I saw that and installed it, thank you :)
<cmcaine[m]>
I'm doing this now to try and work out if I want to stick with nix.
drakonis has quit [Ping timeout: 260 seconds]
<cole-h>
To do that with your own `.nix` file, you could do `nix-shell -E '(import <nixpkgs> {}).callPackage /path/to/file.nix {}'`
<{^_^}>
[nixpkgs] @kini opened pull request #89232 → sbcl: add option to disable immobile space → https://git.io/Jf6IB
<cmcaine[m]>
Installing hub in the traditional way (get source, cd, run make) works without any issue at all. But so far I can't work out how to make a nix package from it at all
<{^_^}>
Found in packages: gitAndTools.hub.bin, haskellPackages.hub
<cmcaine[m]>
Yes, cole-h pointed it out to me earlier.
<cmcaine[m]>
The point is, if I'm going to use a weird OS where you have to jump through hoops to get binaries to work or some sources to build, I should understand the hoop-jumping language
<cmcaine[m]>
And there should be some benefit to jumping them hoops.
<abathur>
cmcaine[m]: do you suspect there's no benefit?
<cmcaine[m]>
Or I should go back to arch, where I understand how things work much better. Which isn't a diss on this project - it can be good and I can not get it.
<energizer>
what's your question cmcaine[m]?
<cmcaine[m]>
abathur: I think there's some benefit, or I wouldn't have installed it to start with ;)
<manveru>
`nix edit nixpkgs.gitAndTools.hub` :)
<cmcaine[m]>
manveru: so my issue with that is that it does some special stuff for go packages.
<energizer>
mnoronha: you can't mix and match different pythons
<cmcaine[m]>
manveru: But from my perspective, all I needed to do was clone, cd, make
<energizer>
mnoronha: (in a single venv)
<cmcaine[m]>
So I think I should be able to make a derivation that does something similar.
<energizer>
mnoronha: you can install packages that aren't in nixpkgs with nix
<energizer>
mnoronha: my suggestion would be using poetry to define the set of packages you want (including jupyter) and using poetry2nix to get them
eoli3n_ has quit [Ping timeout: 265 seconds]
<manveru>
cmcaine[m]: not sure what you mean... you want to install all software using make?
<{^_^}>
[nixpkgs] @7c6f434c merged pull request #89232 → sbcl: add option to disable immobile space → https://git.io/Jf6IB
<cmcaine[m]>
manveru: no, I want to be able to take a package I know how to build without nix, and make it into a nix package without loads of effort.
growpotkin has joined #nixos
<cmcaine[m]>
And without relying on someone else's build file.
<energizer>
cmcaine[m]: that's not hard to do, the build${language}Package functions makes it a little
<energizer>
easier
<cmcaine[m]>
If I can write a shell script that could build the binaries and put them in the right dirs, then I want writing the nix expression and integrating that into my local setup to be about as easy.
<energizer>
sure you can do that
<cmcaine[m]>
cole-h: Thanks, I've been skimming the manual, but I'll try nix-1p :)
<cole-h>
cmcaine[m]: So, the problem with just using the provided makefile is that go attempts to 1) access the network; and 2) access $HOME -- both of which are disallowed in the sandbox.
<energizer>
cmcaine[m]: i think you're probably looking for stdenv.mkDerivation which has "buildPhase" "installPhase" etc corresponding to what you're talking about
urkk has joined #nixos
urkk_ has quit [Ping timeout: 246 seconds]
<evils>
,escape ${
<{^_^}>
Escape this in '' strings with: ''${
<{^_^}>
Escape this in " strings with: \${
<cmcaine[m]>
energizer: I was trying that, and this is what I've got so far: https://clbin.com/254Vo
<cole-h>
Which is why you need to somehow work around this, or just use the `buildGoModule` function that handles this for you.
<cole-h>
You don't need to wrap each dependency, no. You should probably look at what buildGoModule does to see how it achieves the "fetching dependencies, then using these dependencies in a hermetic build"
gustavderdrache has joined #nixos
magnetophon has quit [Ping timeout: 258 seconds]
teto has quit [Ping timeout: 246 seconds]
marusich has joined #nixos
o1lo01ol1o has joined #nixos
<simpson>
And of course it should usually be theoretically possible to glue multiple derivations together into a single franken-pile of builders. But indeed, what would be the point of Nix?
sigmundv_ has joined #nixos
<cmcaine[m]>
I mostly just want reproducible environments and declarative package management.
<energizer>
nix is the tool for that job
<cmcaine[m]>
I don't think those are compromised by a package having a strange build process, but I understand that I don't understand a lot about nix at the mo.
<simpson>
It's not just a strange build process or a wrapper. It's a fundamentally different approach to tracking dependencies compared to the typical package manager. Rewriting the world is to be expected.
o1lo01ol1o has quit [Ping timeout: 258 seconds]
<cmcaine[m]>
To contrast, the programming language Julia cares a lot about reproducibility. So the community have built systems to provide binaries blobs of non-julia dependencies (like, I dunno SDL or GEOS).
hoplaahei has joined #nixos
<cmcaine[m]>
Those binaries are made in some kind of containerised environment, that records what you do to something like a dockerfile, but the upshot for me as a developer is that I can just depend on various dumb scientific libraries that have horrible build systems and I just download a blob that's guaranteed to work with Julia and my system.
<energizer>
sure you can do that here too
mnoronha has quit [Remote host closed the connection]
<hoplaahei>
hi. If I use nix on another OS, will packages that run as daemons and e.g., run elevated privilege commands such as shutdown still work?
<energizer>
you can download a binary blob at build time as long as you know its hash in advance
reallymemorable has joined #nixos
<simpson>
hoplaahei: To a limited extent, yes. Integration with your OS's service management is done per-OS; if you're not on Darwin then you may be in for a bumpy ride.
<cmcaine[m]>
simpson: could you elaborate on "fundamentally different approach to tracking dependencies"? Do you say this because e.g. two packages can depend on different versions of the same dependency? Or something else?
<simpson>
cmcaine[m]: The traditional approach is codified in the FHS, and it says that dependencies live in specific locations on the root filesystem, an ambient mutable data store. Nix packages are immutable and, in typical usage, must be used explicitly by reference.
jluttine has quit [Ping timeout: 260 seconds]
<simpson>
It happens that yes, two different versions of a single package might be includable in a single derivation's inputs. But this is just one small part of the flexibility gained by removing dependence on the filesystem's layout.
drakonis has joined #nixos
<cmcaine[m]>
energizer: Cool, yeah. And the reason you care about touching the network is you want to be able to cache all the files that Nix packages touch on some server somewhere and be able to recreate systems in perpetuity?
<cmcaine[m]>
Or is there some other reason?
drakonis_ has joined #nixos
<abathur>
the network could do anything?
<cmcaine[m]>
And as for not touching home, I don't really get that one. Why not just give the build environment a chroot or something to work in? It can touch a home dir there and nothing bad happens.
<simpson>
In particular, The Network can adaptively return any bundle of bytes for any query. So we must double-check that everything retrieved from the network really has the claimed size and hash.
konobi has quit [Remote host closed the connection]
<energizer>
cmcaine[m]: that's basically what happens. you can make any directories you want inside the sandbox. nix just doesn't provide those by default
konobi has joined #nixos
drakonis2 has quit [Ping timeout: 272 seconds]
<evils>
,escape /${
<{^_^}>
Escape this in " strings with: /\${
<{^_^}>
Escape this in '' strings with: /''${
<energizer>
and then those directories will be inaccessible outside the sandbox, so there's not usually much point to doing that
drakonis has quit [Ping timeout: 260 seconds]
<abathur>
cmcaine[m] may be thinking about it backwards? Nix cares more about $HOME getting into the package than the package messing with $HOME
<evils>
,escape "\${
<{^_^}>
Escape this in " strings with: \"\\$\{
<{^_^}>
Escape this in '' strings with: "\''${
<evils>
but what about " strings nested in '' xD
<cmcaine[m]>
re: network, Sure, but if we're talking about golang or something, it's going to be validating hashes against a manifest anyway. I only care that the package build eventually succeeds once, then I've got a binary blob that I can cache forever.
<cmcaine[m]>
Is the point just to vendor all the dependencies on a common infrastructure so that the whole system can be built from source?
marcusr has quit [Remote host closed the connection]
<cmcaine[m]>
What's the harm?
<cmcaine[m]>
abathur: but it seems like nix-build stops a package building environment from accessing HOME. I just don't know why it doesn't permit access to some empty dir and call that HOME so that the build systems don't get confused.
<cmcaine[m]>
Just because looking at the home dir is a heuristic that something wacky is going on?
jluttine has joined #nixos
<cmcaine[m]>
Because if every time we build, we always offer an empty home dir, that seems safe and reproducible to me?
<abathur>
not if the program expects files it wrote to $HOME to actually exist there to run?
NeoCron has quit [Ping timeout: 260 seconds]
<cmcaine[m]>
It looks like in the stdenv.mkDerivation, the person who writes the file is expected to know what files to pull out and out in $out, and everything else is thrown away.
<cmcaine[m]>
So why is $HOME special?
<cmcaine[m]>
Compared to e.g. the source dir or anything else you download?
<abathur>
if you want to second-guess the whole design you should probably go write a forum post or an email or something rather than grilling random people on IRC
<cmcaine[m]>
My apologies, I didn't mean to grill anyone, I'm mostly looking for introductory materials (which I now have links for) and asking questions that I wasn't expecting to be so difficult.
<infinisil>
evils: Those are just " strings :)
<simpson>
cmcaine[m]: The answers to the questions are pretty easy, from beyond the looking glass. p190 of the thesis relates disconnecting from $HOME to the idea that "the component has no environment dependencies" at time of build; we shouldn't have to set up some special environment to build packages, besides the explicitly-described environment in each package's derivation.
<simpson>
Rather than using heuristics to probe for purity, Nix starts from pure assumptions and then relaxes them a bit according to practical concessions.
<abathur>
it's fair to be curious; you're just mostly asking people who didn't design the system about design questions that are probably better answered by talking to eelco, or a long theoretical discussion on the forum, or reading the thesis
tmaekawa has joined #nixos
<abathur>
it just isn't a great venue for getting good answers to good questions
<abathur>
erg, that came off as more of an IRC diss than I mean
<abathur>
it's just a limited form for a deep discussion that actually lays things out; it's ephemeral and the people who know best don't have time to explain it every time it comes up on IRC
tmaekawa has quit [Quit: tmaekawa]
MmeQuignon has quit [Ping timeout: 246 seconds]
<evils>
infinisil: the " didn't come through, i had to escape it too, `\"\''${` in ''
<infinisil>
> '' "\''${ ''
<{^_^}>
"\"\\${ "
<infinisil>
Works without escaping here?
<cmcaine[m]>
abathur: simpson thanks both. I'll do some more reading and come back another day :)
<cmcaine[m]>
And I'll try the thesis first where I have questions about design. It's nice to have primary sources!
<abathur>
cmcaine[m]: forum's at discourse.nixos.org btw
reallymemorable has joined #nixos
<cmcaine[m]>
Yup, I got some help on there earlier about an issue with zsh :)
reallymemorable has quit [Client Quit]
LevelChart8 has joined #nixos
<LevelChart8>
If I pull a github repo to my machine (Javascript project), and I want to use nix-shell to manage the development environment, does that git repo need to be a subdir of a dir that holds the shell.nix file?
<simpson>
LevelChart8: Nope. In fact, I usually keep my shell.nix in the root, and just don't check it in. I also keep my .envrc in the root, when using direnv, and don't check that in either. (Obviously they *can* be checked in, if you intend for folks to use a direnv workflow!)
<abathur>
LevelChart8: no; you can write it in the project directory but not git add it if you want
<LevelChart8>
Is there an idiot-friendly guide for setting up shell.nix
jluttine has quit [Ping timeout: 264 seconds]
codygman has quit [Ping timeout: 256 seconds]
codygman has joined #nixos
<hpfr[m]>
Anyone manage their emacs config with nix? You’d lose out on editing it on the fly...
<gchristensen>
I do
codygman has quit [Read error: Connection reset by peer]
<qyliss>
I do
codygman has joined #nixos
<qyliss>
Usually it's enough to be able to evaluate-sexp on the bit I just edited
<gchristensen>
though I edit my config roughly every time adisbladis is annoyed by my config.
<qyliss>
*eval-last-sexp
fusion809 has joined #nixos
jluttine has joined #nixos
<qyliss>
My emacs config is one of the only configurations I haven't published because I'm so ashamed of it
<{^_^}>
[nixos-search] @garbas pushed to one-index-per-channel « use one index per channel »: https://git.io/Jf6tb
<hpfr[m]>
gchristensen: do you do a similar thing to qyliss where you eval sexp’s as needed
<gchristensen>
yeah, but I cant stress enough how little I configure emacs
<{^_^}>
[nixos-search] @garbas opened pull request #54 → use one index per channel → https://git.io/Jf6tN
<simpson>
LevelChart8: https://bpa.st/SR4Q might get you up and running, for a development environment.
codygman has quit [Ping timeout: 260 seconds]
<hpfr[m]>
Alright, thanks y’all
<LevelChart8>
simpson: I drop that in a file called shell.nix?
<simpson>
Yes.
<hpfr[m]>
<gchristensen "yeah, but I cant stress enough h"> But that’s the point haha
<LevelChart8>
where do i put it
<gchristensen>
yeah, for that reason I've considered going back to vim
codygman has joined #nixos
<hpfr[m]>
gchristensen I would consider doom emacs if you want something opinionated and configured
<simpson>
You'd put shell.nix in the root of your project, and then when you run nix-shell in your root, it'll first look for shell.nix, then for default.nix. Check the man page for more information; nix-shell can do many things.
<LevelChart8>
But it would be one dir above the local copy of the github repo
<abathur>
why?
<LevelChart8>
Is that directed at me?
<abathur>
yes
<abathur>
you asked, and he said, but then you refuted what he said, so--why?
<LevelChart8>
I am trying to understand what "at the root of my project" means if I don't want it synced to github
<LevelChart8>
that was a question
<simpson>
Just don't check it in.
<LevelChart8>
sorry, I forgot the question mark
<abathur>
a git repo won't sync anything you don't commit
<turq>
(...).env in shell.nix somehow grabs the .env from default.nix. how is that? is (...).FOO equivalent to calling a function or using a getter in OOP?
<ldlework>
If you were installing a second version of a package, with a custom patch, along side the original; what is your personal favorite of way of avoiding the names of the binaries colliding?
<ldlework>
I did a small writeScriptBin thing
<lovesegfault>
can I construct a string from a path that doesn't exist?
<lovesegfault>
like I want to pass /foo/bar/imnothere to a function that does (path: lib.warn "path doesnt exist!!" false)
<{^_^}>
[nixpkgs] @zowoq opened pull request #89236 → .editorconfig: fix for node-packages → https://git.io/Jf6Yi
<{^_^}>
[nixpkgs] @Gabriel439 opened pull request #89237 → Nixpkgs support for `dhall-to-nixpkgs` → https://git.io/Jf6YM
is_null has quit [Ping timeout: 256 seconds]
justanotheruser has quit [Quit: WeeChat 2.7.1]
justanotheruser has joined #nixos
medvid_ has joined #nixos
KindTwo has joined #nixos
KindOne has quit [Ping timeout: 272 seconds]
<{^_^}>
[nixpkgs] @tomfitzhenry opened pull request #89238 → Remove the deprecated 'copy_file_from_host' from the manual → https://git.io/Jf6Yd
medvid has quit [Ping timeout: 256 seconds]
<angerman>
why is there no `nix-build-on <user@host> <nix-build-args>` That would basically do `nix-copy-closure --to <user@host> $(nix-instantiate <nix-build-args>) && ssh <user@host> 'nix-build $(nix-instantiate <nix-build-args>)', and then nix-copy-closure --from ...?
<lovesegfault>
angerman: The right way to do this is to set up a remote builder
KindTwo is now known as KindOne
<angerman>
lovesegfault: well that does not work if you local and remote systems are not identical.
<lovesegfault>
angerman: Define identical
<angerman>
That's what I tried at first, but then nix (on x86_64/macOS) tried to execute some `bash` build for aarch64/linux.
<lovesegfault>
angerman: You can set remote builders of different architectures
<angerman>
or maybe I've messed up cores, and jobs.
<lovesegfault>
you're missing a speedFactor
<angerman>
still that ends up trying to execute bash for aarch64-linux on my mac. I don't discount this being a bug in the nix expressions... it's not the first time this happened htough.
<lovesegfault>
Yeah that really shouldn't happen
<clever>
angerman: are you using `--optino system` ?
<lovesegfault>
trace: <PRIMOP>
<lovesegfault>
why can't trace give me what I want? :(
<angerman>
clever: yep
<clever>
angerman: that would be your problem then
<clever>
angerman: --option system aarch64-linux tells nix that your current cpu is aarch64
<clever>
so it trusts you, and tries to run aarch64 binaries
<angerman>
another day another surprise :-/
<clever>
you want to instead set the system arg of nixpkgs to that, `import <nixpkgs> { system = "aarch64-linux"; }` and leave the --option alone
<clever>
then it will want aarch64, but find it doesnt match the host, so it will look for a builder
<lovesegfault>
You can do --argstr system aarch64-linux
<clever>
if the default.nix your loading is nixpkgs, yeah
* lovesegfault
nods
<lovesegfault>
ARGH how can I get trace to show me the damn thing I'm tracing?
<clever>
lovesegfault: how are you calling it?
<lovesegfault>
It keeps complaining it can't cast a list to a string, so I'm trying to trace the value that supposedly is a list and it's exploding
<simpson>
Is there a way to know how old the current (nixpkgs) channel is? I want to know how long it's been since system.autoUpgrade's timer last ran, which I can get from systemd, but I also want to know how fresh the autoupgraded nixpkgs is.
alp has quit [Ping timeout: 272 seconds]
<energizer>
simpson: nixos-version?
noudle has joined #nixos
<simpson>
energizer: I guess I could parse that, but I still think that that's a bit oblique.
<energizer>
simpson: what kind of answer are you looking for?
<energizer>
like, a timestamp or what
<simpson>
energizer: Yeah, a timestamp would be great. I want to export this to Prometheus; my current plan is to find some sort of timestamp and then munge it into Prometheus textfile format and use the node exporter.
<energizer>
simpson: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' gives the same answer as nixos-version but without the nickname
codygman has quit [Ping timeout: 260 seconds]
<simpson>
energizer: That's not nearly precise enough for me, but thanks.
<energizer>
nix-env --list-generations gives timestamps too but probably not the info you want
<DigitalKiwi>
love when X locks up (but mouse cursor still moves huh) and i have to ssh in from my phone and restart display-manager (hey, at least that worked, sometimes i can't even do that and have to force power off)
<energizer>
sometimes that happens when i'm out of ram
<simpson>
energizer: Motivating metric: At a glance, which machines have outdated nixpkgs?
<energizer>
simpson: what's the relevant meaning of "have"
<energizer>
?
<energizer>
like, recently updated channel, or also rebuilt
<simpson>
energizer: Well, I'd like both numbers, right? But we could start with the latter. Presumably one would scrape a pair of raw metrics, and then compute a comparison to see whether the last update successfully built.
<simpson>
energizer: Hypothetical: There was an update 16hrs ago to nixpkgs. My system.autoUpgrade across the fleet is set to once per 24hrs, the default. So about a quarter of the fleet won't already have it, by expectation; which machines would those be?
ddellacosta has quit [Ping timeout: 246 seconds]
<energizer>
simpson: i have a computer on which nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
<energizer>
"20.09pre226148.0f5ce2fac0c"
<energizer>
i imagine that hash corresponds to some git commit
<simpson>
On at least one machine, I get "20.09pre-git" which seems not-wrong.
<energizer>
might be worth looking at the source of lib.version to see what it's doing
<energizer>
there's even some {^_^} command to do that but i forget
jakob_rs has joined #nixos
<jakob_rs>
What's the policy on correcting spelling errors?
<{^_^}>
[nixpkgs] @FRidh pushed 79 commits to staging-20.03: https://git.io/Jf6sn
<samueldr>
DigitalKiwi: huh, patches can be a single file?
<DigitalKiwi>
english only language
<samueldr>
I thought it had to be a list, but thinking about it, it makes sense that it works because of how it ends up interpreted in bash I guess
<DigitalKiwi>
it definitely worked
<DigitalKiwi>
i cargo culted it from another package
<samueldr>
DigitalKiwi: just saying, when the patches are not for optimizations things, I would say "always apply them", but here it's the right call, since otherwise it'd lose some perfs I gather
<samueldr>
a patch that is unconditionally applied will break faster when someone makes an update :)
<DigitalKiwi>
i have a kvm of macos now i can install nix on and try to build all of my packages that support macos on... :D
<DigitalKiwi>
like i said i was going to do in november
<samueldr>
good on you, I started doing that in like 2018, but never finished :)
<balsoft>
freeman42x: what's the output of ldd /home/neo/.atom/packages/atom-ide-ui/node_modules/nuclide-prebuilt-libs/pty/build/pty-node-v69-linux-x64/pty.node ?
evanjs has quit [Read error: Connection reset by peer]
<freeman42x[m]1>
balsoft: could we discuss this on the ticket itself? would be more useful for other people later
<freeman42x[m]1>
No such file or directory
evanjs has joined #nixos
ok2` has quit [Ping timeout: 246 seconds]
jakobrs has joined #nixos
<jakobrs>
Is there anything I need to remember if I want to use virtualisation.libvirtd and virt-manager on NixOS?
<balsoft>
freeman42x: that file is a dynamically linked executable, right?
ok2` has joined #nixos
<freeman42x[m]1>
<balsoft "freeman42x: that file is a dynam"> I do not know, I have not worked with C/C++ since forever
<b42>
if you want to use virt-manager under non-root user you need to add him to the libvirt group and also export LIBVIRT_DEFAULT_URI=qemu:///system in your shell
<jakobrs>
Should I also touch the kvm group?
__monty__ has joined #nixos
<b42>
jakobrs: my user is not in it and things seem to work find
<b42>
does anyone know what's the difference between "# packages defined here" and "# packages defined elsewhere" in pkgs/top-level/python-packages.nix?
jakobrs has left #nixos ["WeeChat 2.7.1"]
<adisbladis>
b42: I think it's just a remnant from when packages were defined directly in python-packages.nix as opposed to pkgs/development/python-modules
<adisbladis>
That file used to be full of inlined packages
<Avaq>
Hi. I can't find much information on type coercion in Nix. How do I deal with: "cannot coerce an integer to a string"? I want 1337 to simply become "1337" in interpolation.
<betawaffle>
if you `import` a file multiple times, is it only parsed/evaluated once?
proofofkeags has quit [Ping timeout: 256 seconds]
<Thra11>
freeman42x[m]1: I notice that balsoft's comment uses `prev.haskellPackages.override`, while yours does `haskellPackages // { ... }` Does it make a difference if you use override?
NeoCron has joined #nixos
<eyJhb>
How can I do a inline allowUnfree?
<eyJhb>
`ExecStart = "${pkgs.dropbox-cli}/bin/dropbox start";`but it is unfree
<freeman42x[m]1>
Thra11: if I do that I get: error: attribute 'cachix' missing, at /nix/store/iksxxik9x90v5j45l472v0rqkkxc0jcd-nixos-20.03.2015.e7752db2fb6/nixos/pkgs/top-level/all-packages.nix:11061:46
chloekek_ has quit [Ping timeout: 256 seconds]
mthst has quit [Ping timeout: 258 seconds]
<eyJhb>
I have nixpkgs.config.allowUnfree = true; in both configuration.nix and the actual file that uses it
o1lo01ol1o has quit [Remote host closed the connection]
OmnipotentEntity has quit [Ping timeout: 240 seconds]
knupfer has quit [Quit: knupfer]
knupfer1 has joined #nixos
knupfer1 has quit [Client Quit]
knupfer has joined #nixos
hmpffff has joined #nixos
CMCDragonkai1 has joined #nixos
<c4droid>
LnL: Can be using the new mirror site when installing nixos?
<chrisaw>
Just a quick question - in the NixOS Wiki it states that the following should enable native pulseaudio support in all apps which support it - is that still the case? nixpkgs.config.pulseaudio = true;
<chrisaw>
^ Disregard - answered my own question. Yes it does but it's already enabled by default now. Got it.
MmeQuignon has joined #nixos
<makefu>
chrisaw: be sure to updat the wiki with this info :)
knupfer has quit [Ping timeout: 260 seconds]
<balsoft>
Hi, does anybody know a good way to "copy" a nixos option type? In particular, I'm working on nixoses, trying to add functionality to separate some systemd units from the system. I'd like for users to be able to just copy their unit definitions from nixos config as-is, without the need to rewrite them in text, and I don't want to just copy-paste the modules from nixpkgs.
<balsoft>
I'm fine with just evaluating config and then scavenging the units from environment.etc
<balsoft>
But I need to set the type for my option.
<romdisc>
I'm confused. The nix-shell command creates an isolated environment. I have an overlay assigned to my shell.nix but it won't get fetched. Is nix-shell an isolation or not?
<romdisc>
I downgraded gperf to 3.0.4
klntsky has quit [Remote host closed the connection]
klntsky has joined #nixos
<balsoft>
infinisil: yes
<balsoft>
Didn't notice the rename :)
rogue_koder_ has joined #nixos
rogue_koder has quit [Ping timeout: 264 seconds]
is_null has joined #nixos
Stuck_ has joined #nixos
<clever>
romdisc: how did you assign the overlay in shell.nix?
<romdisc>
nix-shell shell/shell.nix with and without --pure
<infinisil>
balsoft: You can inspect option types through e.g. `options.environment.systemPackages.type`
<clever>
romdisc: can you pastebin the shell.nix?
<balsoft>
infinisil: that's what I thought, but it results in stack overflow here
<Stuck_>
hi, I've been messing around in /sys/class/leds/ath9k-phy0, which is the leds for my wireless driver, and now my wifi doesn't work... how can I reconfigure this stuff in nixos?
o1lo01ol1o has joined #nixos
<balsoft>
Stuck_: easiest fix should be to reboot, but I know it's not a very interesting solution :)
<infinisil>
balsoft: Can't reproduce with just that
<Stuck_>
well The messing around was yesterday, and after a shutdown still doesn't work
<clever>
romdisc: why is it not using stdenv.mkDerivation ?
cantstanya has quit [Ping timeout: 240 seconds]
o1lo01ol1o has quit [Ping timeout: 256 seconds]
<clever>
romdisc: also gperf doesnt use the version attribute, so overriding version wont actually change the version
<clever>
romdisc: you need to override name and src
cantstanya has joined #nixos
<romdisc>
name = "gperf"; is obvious. how do I look up the source
<clever>
romdisc: look at the original gperf, `nix edit nixpkgs.gperf` and set src the same way, but with the new version and hash
Stuck_ has quit [Quit: leaving]
<romdisc>
where do I find the hash
<romdisc>
do I need to download and generate
<clever>
,tofu romdisc
<{^_^}>
romdisc: To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected. See: tofu-vim
Stuck_ has joined #nixos
<Stuck_>
\msg balsoft even after a reboot the nmtui doesn't catch wifi...
<balsoft>
Stuck_: oh, that's pretty bad. Sounds like you've actually messed up the card.
travelion78 has quit [Quit: bye]
<balsoft>
Is it still recognized as a device in lspci/lshw ?
<Stuck_>
yes it is
<clever>
Stuck_: have you checked rfkill?
<Stuck_>
no
<balsoft>
Are there any obvious errors in dmesg | grep ath ?
<Stuck_>
doesnt seem like there is any error in dmesg
travelion78 has joined #nixos
<Stuck_>
hoo, rfkill says that is hard blocked
<clever>
Stuck_: that implies you hit the switch to disable wifi
<clever>
Stuck_: depends on the machine, some have it in hw, some just have fn+f2 to toggle it in semi-software
<Stuck_>
... that was it, thank you, jesus f*ing christ I feel stupid
<{^_^}>
[nixpkgs] @winpat opened pull request #89248 → pytest-factoryboy: init at 2.0.3 → https://git.io/Jf64G
LevelChart8 has joined #nixos
knupfer has quit [Ping timeout: 265 seconds]
Stuck_ has quit [Quit: leaving]
knupfer has joined #nixos
dermetfan has joined #nixos
dermetfan has quit [Client Quit]
dermetfan has joined #nixos
<cyris212>
What is the best way to add a package to shell.nix which is not yet in nixpkgs?
is_null has quit [Ping timeout: 256 seconds]
philr has quit [Ping timeout: 246 seconds]
dermetfan has quit [Quit: WeeChat 2.7.1]
dermetfan has joined #nixos
<LevelChart8>
Given that NodeJS is on version 12x, would I add the "nodejs" package to my config or "nodejs_v12x"?
<{^_^}>
[nixpkgs] @david-sawatzke opened pull request #89249 → maxcso: init at 1.12.0 → https://git.io/Jf64M
<LevelChart8>
My intuition is that "nodejs" is the standard that would get updated each time nix is rebuilt.
<betawaffle>
is there a nix builtin to read a symlink?
chloekek_ has quit [Ping timeout: 240 seconds]
<teto>
cyris212:if it's justfor your personal use, an overlay otherwise just open a PR on github
<balsoft>
betawaffle: I think builtins.writeFile "name" (builtins.readFile /path/to/link) should work, but maybe there's a better solution
<xfix>
`nodejs` for 20.03 is v10.19.0, if you need specifically Node.js 12, i would use `nodejs-12_x`
<betawaffle>
balsoft: i mean to read what a synlink points to, not the contents of the destination
<balsoft>
betawaffle: well, I thought in most cases you'd want the file to end up in the nix store anyways? What are you trying to achieve exactly?
<cyris212>
teto: Ok thx
<LevelChart8>
xfix: thanks
<betawaffle>
just experimenting
<cyris212>
Often I need to package a dependency which is not yet in nixpkgs. Contributing takes a couple of days/weeks. So I am looking for a solution for in-between.
<teto>
cyris212: that's the most annoying thing: you can use a VM, nixpkgs' buildFHSUserEnv to mimic traditional distribs in nixos, but the best is to package it for nix ofc :) There are some packages that are referenced in NUR but not in nixpkgs so you want to check that out
<bqv>
cyris212: fwiw you can package it for nix and use it directly without making a PR to nixpkgs
<bqv>
obviously the PR is what takes the longest so just don't depend on that part
<cyris212>
That's why I am currently learning about how overlays work. So I can package them, send them upstream and use them in the mean time.
<{^_^}>
[nixpkgs] @flokli merged pull request #89224 → unit: Expose PHP expressions used so it can easily be accessed for configs → https://git.io/JfKxx
fusion809 has quit [Remote host closed the connection]
<calbrecht>
yes
<calbrecht>
bqv: that's good. it seems to me the shell completion does this as well?
ddellacosta has joined #nixos
<calbrecht>
LevelChart8: however, the only reference i can find in node-packages.nix on the master is the source to create-react-native-app, did you search for this?
greizgh has quit [Quit: greizgh]
acarrico has quit [Ping timeout: 265 seconds]
<LevelChart8>
Thank you. I will look at it. I am attempting to build someone else's project and they specifically use expo-cli.
<LevelChart8>
I will read on the relationship between create-react-native-app and expo-cli
<betawaffle>
am i supposed to use `edition` or `epoch` in a flake?
mchasard has joined #nixos
<mchasard>
hi
<simpson>
Is there a list of what is acceptable as far as bootstrapping, for packages which don't compile to C?
<mchasard>
i would like to install bluetooth to appair a jbl go speaker ...what should i install ?
user_0x58 has joined #nixos
hazel has joined #nixos
hazel has quit [Remote host closed the connection]
hazel has joined #nixos
<hazel>
hi so I just installed NixOS on encrypted ZFS
<hazel>
and what I'm noticing is that /tmp doesn't wipe on reboot
<hazel>
how do I make it... do that
<xfix>
you need to enable one of /tmp options
<hazel>
any docs?
<simpson>
hazel: boot.tmpOnTmpfs = true;
<bqv>
calbrecht: the shell completion ignores recurseForDerivations entirely
<bqv>
but nix search doesn't
<xfix>
either `boot.cleanTmpDir` or `boot.tmpOnTmpfs`
<hazel>
what's the difference?
<simpson>
xfix++ for alternatives.
<{^_^}>
xfix's karma got increased to 4
<hazel>
also, thank you very much!
<simpson>
hazel: The former removes everything from /tmp; the latter mounts an in-memory tmpfs onto /tmp. The reason why we don't unilaterally tmpfs on /tmp like some other distros is because not everybody has the RAM for it.
<chaoflow>
clever, simpson: Thanks a lot!
greizgh has joined #nixos
ddellacosta has quit [Ping timeout: 260 seconds]
greizgh has quit [Client Quit]
hazel has quit [Remote host closed the connection]
<calbrecht>
bqv: ha, never used nix search, thanks :)
greizgh has joined #nixos
<calbrecht>
when i started with nixos it was nix-env -qa, which confused me a lot
codygman has quit [Read error: Connection reset by peer]
codygman has joined #nixos
glasserc has joined #nixos
mchasard has left #nixos ["Konversation terminated!"]
codygman has quit [Read error: Connection reset by peer]
hazel has joined #nixos
<hazel>
hi, back, and yes that worked
<hazel>
another question
codygman has joined #nixos
acarrico has joined #nixos
<hazel>
how do I prevent Nix (the language) from trimming the end of strings? like what if I have whitespace that's meant to be there?
<lassulus>
hazel: do you have an example?
<lassulus>
it doesn't trim trailing spaces for me?
<glasserc>
Is there a way to build a binary on NixOS (my development machine) that I could deploy to non-NixOS (production)? My ELF binaries end up with interpreter /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/ld-linux-x86-64.so.2, which doesn't work
<lafrenierejm>
Nix noob here. Can someone tell me where exactly I should be placcing the overlay snippet from https://github.com/nix-community/emacs-overlay if I only want the overlay to be available to my personal user?
mchasard has quit [Quit: Konversation terminated!]
pjt_014 has joined #nixos
<ashkitten>
is there a library function to export a nix expression as a string? something like the toJSON functions but it just writes it out as-is in nix
<buckley310>
anyone here good with the X11/mesa stack? i've found a couple bugs making it so the options from /run/opengl-driver/share/drirc.d/00-mesa-defaults.conf are not applied, but even when i fix those its not working :\ a little bit out of my depth
agsdheidjd has joined #nixos
maxdevjs has joined #nixos
<abathur>
anyone have a sense of what to look for if a CI build that ran clean a few days ago now fails with a `error: unknown hash algorithm ''` in fetchurl? guessing it has something to do with the dated 2.0.4 version of Nix installed there.
urkk has quit [Remote host closed the connection]
vidbina has joined #nixos
user_0x58 has quit [Remote host closed the connection]
drakonis has joined #nixos
user_0x58 has joined #nixos
<abathur>
heh, on the 2-year anniversary of 2.0.4, even
<clever>
abathur: sounds like the nix-daemon is too old for the new hashing setup
lafrenierejm has quit [Remote host closed the connection]
<abathur>
clever: good spot; it ran clean on the 27th, so it's a recentish break; looks like rycee mentioned this a few weeks ago: https://logs.nix.samueldr.com/nixos/2020-05-01#1588336582-1588336626; so I assume something in my graph just finally got bumped up to the new format
<wadkar>
Hi, I am on macOS and recently started using nix. How do I temporarily disable nix, so that I can go about using my brew/custom built packages? I wouldn't mind switching back to nix after a while. But currently it's getting a bit in my way of getting things done.
cript0nauta has joined #nixos
<samueldr>
hm :/ what's the status of SRI hashes then?
<wadkar>
I am on a limited bandwidth network (~1mbps) so downloading stuff is an expensive process. So I don't want to uninstall nix and it's store/cache.
<abathur>
wadkar you shouldn't really need to "disable" Nix; are you just trying to make sure brew commands run instead of Nix for now?
<abathur>
wadkar you can either comment the nix line(s) out in your rc file and reload your terminal, or intentionally change your path to make sure that .nix-profile/bin is last
<abathur>
or, at least, behind wherever you have brew installing to
shibboleth has joined #nixos
agsdheidjd has quit [Ping timeout: 246 seconds]
agsdheidjd has joined #nixos
<wadkar>
abathur: yes - sort of
<wadkar>
I get it.
<wadkar>
so just "restore" my `/etc/zprofile` and other rc files to original ones and I should be good to go.
<abathur>
wadkar as long as you aren't having trouble with a launchd service it's managing or something, of course; it might help to add a pair of functions in your shell rc/profile to add/remove it, or move it from the front to the back of the PATH, so you can get it out of the way when you want but make it easy to play with when you have time
shyim has joined #nixos
numkem has joined #nixos
<wadkar>
abathur: I don't see any issues with launchd; I haven't installed any services with nix-env (yet)
<numkem>
I'm trying to re-deploy a machine that has hydra configured. Nothing changed in my code relating to hydra but it triggers a build (stable or unstable) and that build fails because of some errors (error: no matching function for call to 'MyArgs::mkFlag()') is this something known and/or is there a workaround?
<{^_^}>
[nixpkgs] @cript0nauta opened pull request #89262 → mpvScripts.simple-mpv-webui: init at 1.0.0 → https://git.io/Jf6Kl
<{^_^}>
[nixpkgs] @doronbehar opened pull request #89264 → ffmpeg: default to ffmpeg_4 → https://git.io/Jf6iu
teto has joined #nixos
o1lo01ol1o has joined #nixos
<abathur>
anyone know of a tolerable way to search a build's dependency graph to confirm whether or not it has packages that've switched to SRI hashes?
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
codygman has quit [Read error: Connection reset by peer]
codygman has joined #nixos
codygman has quit [Read error: Connection reset by peer]
codygman has joined #nixos
teto has quit [Quit: WeeChat 2.8]
<abathur>
I guess it's pip
<{^_^}>
[nixpkgs] @doronbehar opened pull request #89265 → hplip: don't reference gcc in binaries from /share and other locations → https://git.io/Jf6P2
<{^_^}>
[nixpkgs] @talyz opened pull request #89266 → php.extensions.mysqlnd: Fix compression support → https://git.io/Jf6PD
<kini>
What's the best way to get a shell environment that is as similar as possible to the build environment for a package? Normally I use `nix-shell --pure` but it seems that's not always enough, e.g. `nix-shell --pure` still has `/usr/bin/env` while the real build environment does not.
<manveru>
kini: probably using the breakpointHook
o1lo01ol1o has quit [Ping timeout: 258 seconds]
<manveru>
with that you can go into the sandbox that the build runs in
<energizer>
how much work is involved in switching my nixoses from channels to flakes?
<{^_^}>
[nixpkgs] @flokli merged pull request #88434 → nixos/haproxy: add reloading support, use upstream service hardening → https://git.io/JfzjN
<noreferences>
How could I install multiple versions of OpenJDK? Home-manager suggests that there is a collision when I try to declare both jdk and jdk11 in my configuration.
<{^_^}>
[nixpkgs] @GTrunSec opened pull request #89270 → julia: fix julia_13 missing Lib of lapack. → https://git.io/Jf613
hmpffff has joined #nixos
<mica[m]>
noreferences: try being more specific for the "jdk" I'd think
<clever>
noreferences: better to not "install" any jdk's in that case, use makeWrapper&friends to make certain programs use the right jdk directly
hmpffff has quit [Client Quit]
<noreferences>
I need openjdk11 and openjdk8 available for my work - namely, I need Intellij to have access to both.
<noreferences>
mica[m]: jdk is the attribute name for openjdk-8u222-ga, I'm not sure I understand how I can be more specific.
o1lo01ol1o has joined #nixos
<{^_^}>
[nixpkgs] @dpausp opened pull request #89271 → eliot-tree: init at 19.0.1 → https://git.io/Jf61c
<infinisil>
noreferences: How does intellij know about the two versions?
<noreferences>
Normally on Arch, I'd have one java version that I'm using globally, say Java 11, but then if I want to, I can point to Java 8 SDK from Intellij if I need java 8
<infinisil>
noreferences: How can you point it to a specific version though, like with a path to some jdk directory?
<noreferences>
path, like /usr/lib/jvm/java-8-openjdk
<infinisil>
And that's a binary?
<noreferences>
no, it includes a bin folder, include folder, jre folder and a lib folder
NeoCron has quit [Ping timeout: 260 seconds]
<infinisil>
Hm I see
<infinisil>
noreferences: One slightly unorthodox way to do this then is to set e.g. `environment.etc.jdk11 = pkgs.jdk11` and similarly for others
<infinisil>
Then you can point intellij to `/etc/jdk11`
<infinisil>
Oh that should be `environment.etc.jdk11.source = pkgs.jdk11`
<noreferences>
Oh nice, I'll try this now
<mpickering>
I am trying to package something which needs an older version of a C library, tbb 2018 rather than tbb 2019 which is in nixpkgs
<mpickering>
what is recommended to do here?
<ben>
it's binary-only?
jmeredith has quit [Quit: Connection closed for inactivity]
<ben>
(i dont have an answer, just also curious)
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #nixos
meh` has joined #nixos
<kini>
manveru: Hmm, with breakpointHook I still see `/usr/bin/env`. In fact, it's even looser than `nix-shell --pure` because I also see various other programs I have installed systemwide which shouldn't be visible inside the sandbox.
<infinisil>
mpickering: Ideally update the package to work with the newer version, but if that's too much work you can introduce the older version into nixpkgs too
<mpickering>
ok
<mpickering>
I took the third option
<mpickering>
which was to use an old pin of nixpkgs and not bother to upstream it
<mpickering>
sorry team
<infinisil>
That's fine too, could even put this into NUR or so :)
<infinisil>
mpickering: What's the package?
<mpickering>
tracy
<mpickering>
We are viewing eventlogs using it
o1lo01ol1o has quit [Remote host closed the connection]
<mpickering>
Perhaps I could make an issue and post my nix expression in it explaining why I didn't make a PR
<kini>
I think there are several packages in nixpkgs where there's an older version being kept around because it's used by something else
<adit[m]>
on reboot, nixos seems to be rebooting to the previous generation
<adit[m]>
how do i ensure this doesn't happen?
asymptotically has quit [Quit: Leaving]
<mpickering>
good news, the package builds but segfaults as soon as I try and run it
<{^_^}>
[mobile-nixos] @samueldr pushed 21 commits to master: https://git.io/Jf6MQ
<colemickens>
I'm a bit frustrated, is there an option issue about nscd being needed recently on nixos-unstable?
<colemickens>
I've had to avoid enable the mdns module for nss in the past, in order to disable NSCD, but I've started getting the error about NSS modules after some nixpkgs upgrade.
<flokli>
we kinda had the assertion all the time, but then circumemvented it by checking, and only adding the modules if nscd was enabled, making the whole assertion useless
<flokli>
the comments, and the error message you get during eval should propose a workaround
* colemickens
notices a common theme among those unhappy about nscd
<colemickens>
okay. still reading but this is helpful, I probably should've managed to find this on my own
<flokli>
can you elaborate on the "commen theme? It's also the dns re
<flokli>
s/re/resolving from a separate namespace?/
<colemickens>
yes, vpn+net-ns+nscd = dns leaks
cr4y1 has quit [Ping timeout: 240 seconds]
cr4y1 has joined #nixos
<ldlework>
If I do this: builderPython = pkgs.python27.withPackages (ps: [ ps.numpy ps.scipy ])
<ldlework>
how can I also make sure gunzip is available in there?
<flokli>
colemickens: I have some ideas about whether it might be possible to have nscd fall back clients to resolve DNS locally. But that would probably involve patching glibc.
<Ashy>
colemickens: i've recently turned nscd back on because of disabling it being not recommended on nixos but i've only ever noticed it cause me dns caching issues sometimes
<Ashy>
not really happy about having to run it
<flokli>
Ashy: for that, I might have something for you
avoo22 has joined #nixos
dermetfan has quit [Ping timeout: 265 seconds]
<{^_^}>
[nixpkgs] @flokli opened pull request #89274 → nixos/nscd: set positive hosts caching ttl to 0 → https://git.io/Jf6DJ
philr has joined #nixos
<flokli>
^ Ashy
<flokli>
colemickens: for your usecase, would disabling nscd inside that specific network namespace (by a private mount mounting the nscd socket to /dev/null) work for now?
proofofkeags has joined #nixos
<colemickens>
flokli: this is up to the edge of my linux knowledge, so I'm not sure. That thing I linked does say that bind mounts are problematic (and that is actually how I discovered this issue ... weird DNS issues -> realizing finally that bind mounting over it DID work until I restart NM (which would re-write resolv.conf and replace the bind mount).
<Ashy>
flokli: thanks hopefully that stops nscd from causing those broken cache issues again
proofofkeags has quit [Remote host closed the connection]
<colemickens>
It ultimately felt easier to disable nscd for my lan vpn use-cases and was a good reminder to use something more purpose-built if I had serious privacy needs 😐️.
proofofkeags has joined #nixos
buckley310 has quit [Quit: Connection closed for inactivity]
numkem has quit [Ping timeout: 246 seconds]
o1lo01ol1o has joined #nixos
proofofkeags has quit [Ping timeout: 256 seconds]
eoli3n_ has quit [Ping timeout: 256 seconds]
kvda has joined #nixos
<aveltras>
is anyone using data-dir or data-files with a haskell package built with nix ?
citizenzibb[m] has left #nixos ["User left"]
o1lo01ol1o has quit [Ping timeout: 260 seconds]
mbrgm has quit [Ping timeout: 246 seconds]
mbrgm_ has joined #nixos
mbrgm_ is now known as mbrgm
<ldlework>
what's a nixlang thing to get every combination of two inputs?
<{^_^}>
[nixpkgs] @jobojeha opened pull request #89276 → utf8cpp: init at 3.1.1 → https://git.io/Jf6DC
<energizer>
ldlework: lib.lists.crossLists
<ldlework>
thank you
<hyperfekt>
i may be very wrong but shouldn't the boot packages be hidden from ghc by default? seems easy to miss specifying a dependency otherwise
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<flokli>
colemickens: that article speaks about bind-mounts of a different /etc/resolv.conf into the namespace, and this falling back to another resolv.conf
<ldlework>
Is there a nixlang thing to convert an attrset to a list of NameValue attrsets?
<ldlework>
actually nevermind
kvda has joined #nixos
<flokli>
colemickens: depending on your privacy needs, there's indeed a lot of things to consider. I'd probably go with something specifically made for that purpose (tor-browser, tails, …)
<hyperfekt>
oh that's just #42069. no progress but the fix sounds more complex than i may be able to do