| 28 Aug 2021 |
Roos | (Or so I believe) | 08:35:15 |
emmanuelrosa | 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. | 08:48:37 |
emmanuelrosa | It's referenced by set-environment, which is referenced in /etc/profile, so it should not be garbage collected. nix-store --query --referrers /nix/store/bvcyd3qcccdxyi61fk9gmgqp4rm7bkab-source/ /nix/store/0df147kd6hpj1f2wq1ahv92an3i9j9ma-set-environment /nix/store/7b2i6p6x0i4xaxjw2aakdz42azk724y9-etc-environment /nix/store/3z9bw0idqwbd4v130dj0bwr2cylfjryp-etc /nix/store/c3rf672q51l4fg4bjcsip909khm6zhp1-set-environment.drv /nix/store/ycxc3rsnw82fs0129syvaklr5km2ki5s-etc-environment.drv | 08:52:26 |
Roos | emmanuelrosa: I pin my registry nixpkgs flake to the one in the system derivation with this: https://gitlab.com/roosemberth/dotfiles/-/blob/master/flake.nix#L21 | 09:02:37 |
emmanuelrosa | I see. Thanks @Roos. | 09:10:45 |
| 29 Aug 2021 |
Las | ·Does anyone know how you're supposed to use builtins.getFlake now? | 21:39:11 |
Las | It doesn't work with --impure anymore | 21:39:17 |
| 30 Aug 2021 |
bew | 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 | 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 | * 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 | W3F changed their display name from Florian | W3F to Florian | W3F - OoO. | 08:11:42 |
bew | 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 joined the room. | 21:12:04 |
| 2 Sep 2021 |
Florian | W3F | 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 | W3F | 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 | W3F | 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 | W3F | * 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 | W3F | There is some work on shebang support though in #5189 | 07:46:41 |
| papojari joined the room. | 15:02:21 |
| 3 Sep 2021 |
| humancalico joined the room. | 06:34:29 |
emmanuelrosa | Is there a way to update only a specific input in a flake lock file? | 12:25:47 |
nan-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 | something 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/zyElX | 17:58:10 |
edrex | ok 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/CDYla | 18:09:55 |
edrex | i'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 | Wiped everything and did a simple single user install. | 18:45:32 |
edrex | Unrelated 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 | I guess a central build cache for 3rd party flakes is bad since it would allow unverified code in | 18:52:07 |
edrex | is there something in the flake spec that allows the flake author to specify a cache? | 18:52:08 |
tomberek | Yes. It’s a lot to go over. But yes, there are mechanisms to address this. | 21:27:46 |