!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

871 Members
181 Servers

Load older messages


SenderMessageTime
29 Aug 2021
@Las:matrix.orgLas ·Does anyone know how you're supposed to use builtins.getFlake now? 21:39:11
@Las:matrix.orgLas It doesn't work with --impure anymore 21:39:17
30 Aug 2021
@bew:matrix.orgbew
In reply to @Las:matrix.org
·Does anyone know how you're supposed to use builtins.getFlake now?
How did you try to use it? Iirc you pass it a flake uri and it returns you the attrset representing the flake. So you do sth like builtins.getFlake "flake:nixpkgs" or builtins.getFlake "path:." (if you're in a flake dir)
15:55:38
@Las:matrix.orgLas
In reply to @bew:matrix.org
How did you try to use it? Iirc you pass it a flake uri and it returns you the attrset representing the flake. So you do sth like builtins.getFlake "flake:nixpkgs" or builtins.getFlake "path:." (if you're in a flake dir)
It doesn't work anymore with nix eval --expr
16:55:56
@Las:matrix.orgLas *
In reply to @bew:matrix.org
How did you try to use it? Iirc you pass it a flake uri and it returns you the attrset representing the flake. So you do sth like builtins.getFlake "flake:nixpkgs" or builtins.getFlake "path:." (if you're in a flake dir)
It doesn't work anymore with nix eval --impure --expr
16:56:11
31 Aug 2021
@florian:web3.foundationFlorian | W3F - OoO changed their display name from Florian | W3F to Florian | W3F - OoO.08:11:42
@bew:matrix.orgbew
In reply to @Las:matrix.org
It doesn't work anymore with nix eval --impure --expr
Hmm weird, open an issue on Nix's repo I guess
09:52:24
1 Sep 2021
@el_zarco:matrix.orgEl_Zarco joined the room.21:12:04
2 Sep 2021
@florian:web3.foundationFlorian | W3F - OoO
In reply to @emmanuelrosa:matrix.org
OK. The problem I see is that it can differ from the Nixpkgs that's pinned at /etc/nixos. I set the NIX_PATH using nix.nixPath, which I was setting to a local copy of Nixpkg. However, nixpkgs is an input to the Nixos configuration (in the flake.nix), so I tried this nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; and now NIX_PATH is being set to a copy of Nixpkgs in the Nix store :) I'm not sure if that path would get garbage collected, but I'll play with this idea some more.
If combined with deleting all channels and setting nix.registry.nixpkgs.flake = nixpkgs; you should be all set to use your systems pinned nixpkgs for everything.
07:33:05
@florian:web3.foundationFlorian | W3F - OoO
In reply to @emmanuelrosa:matrix.org
I use nix-shell to create bash scripts using the -i intepreter flag. But I don't see a way to do the same thing with nix shell. Right now, I have NIX_PATH so that nix-shell continues to work, now that I'm using Nix flakes to build NixOS. But of course that means it can point to a different Nixpkgs. What's the Flakes equivalent of nix-shell -i bash?
I have not tried this, but maybe nix run nixpkgs#bash might work.
07:33:48
@florian:web3.foundationFlorian | W3F - OoO
In reply to @emmanuelrosa:matrix.org
I use nix-shell to create bash scripts using the -i intepreter flag. But I don't see a way to do the same thing with nix shell. Right now, I have NIX_PATH so that nix-shell continues to work, now that I'm using Nix flakes to build NixOS. But of course that means it can point to a different Nixpkgs. What's the Flakes equivalent of nix-shell -i bash?
* I have not tried this, but maybe nix run nixpkgs#bash -- -i might work.
07:34:11
@florian:web3.foundationFlorian | W3F - OoO * I have not tried this, but maybe nix run nixpkgs#bash -- -i might work. (EDIT: I played around with this, could not make it work with some simple examples. Looks like nix-shell does something special when called as interpreter by the kernel). 07:42:21
@florian:web3.foundationFlorian | W3F - OoO There is some work on shebang support though in #5189 07:46:41
@papojari:artemislena.eupapojari joined the room.15:02:21
3 Sep 2021
@humancalico:matrix.orghumancalico joined the room.06:34:29
@emmanuelrosa:matrix.orgemmanuelrosaIs there a way to update only a specific input in a flake lock file?12:25:47
@nan-matrix:matrix.orgnan-matrix
In reply to @emmanuelrosa:matrix.org
Is there a way to update only a specific input in a flake lock file?
nix flake lock --update-input ...
12:26:42
@edrex:matrix.orgedrexsomething seems hosed with my local nix store, I think related to switching from 2.3 to 2.4pre (i should have switched immediately). https://clbin.com/zyElX17:58:10
@edrex:matrix.orgedrexok i think my mistake is I installed nixUnstable to my normal user profile and it didn't update the daemon? but now I'm getting a weird error trying to update the daemon: https://clbin.com/CDYla18:09:55
@edrex:matrix.orgedrexi'm guessing my issues may have stemmed from using the 3.0pre installer linked at https://nixos.wiki/wiki/Flakes#Non-NixOS 18:45:14
@edrex:matrix.orgedrexWiped everything and did a simple single user install.18:45:32
@edrex:matrix.orgedrexUnrelated question: without lots of overhead managing binary caches on both flake producer and consumer side, moving towards a lot more 3rd-party flakes is going to involve a lot more compiling. Is there any work in the community (or core) on making cache management somehow easier for third party flakes?18:48:53
@edrex:matrix.orgedrexI guess a central build cache for 3rd party flakes is bad since it would allow unverified code in18:52:07
@edrex:matrix.orgedrexis there something in the flake spec that allows the flake author to specify a cache? 18:52:08
@tomberek:matrix.orgtomberek Yes. It’s a lot to go over. But yes, there are mechanisms to address this. 21:27:46
4 Sep 2021
@bew:matrix.orgbew
In reply to @edrex:matrix.org
is there something in the flake spec that allows the flake author to specify a cache?
https://github.com/NixOS/nix/pull/4189 ?
05:13:09
@bew:matrix.orgbewThere's also https://github.com/NixOS/nix/issues/382405:38:56
@bew:matrix.orgbewWhich adds the loading of a local nix.conf file05:39:22
@edrex:matrix.orgedrex
In reply to @bew:matrix.org
https://github.com/NixOS/nix/pull/4189 ?
that was merged to master in Nov, awesome!
19:16:11
@edrex:matrix.orgedrexis there a doc describing the Nix branching strategy somewhere? (wondering how commits to master make it to a release)19:16:47

There are no newer messages yet.


Back to Room ListRoom Version: 6