!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

877 Members
180 Servers

Load older messages


SenderMessageTime
15 Aug 2021
@papojari:artemislena.eupapojari left the room.17:36:02
17 Aug 2021
@hexagonk:halogen.cityhexagonk set a profile picture.05:57:07
@b:chreekat.netchreekat changed their display name from bryan to chreekat.19:59:04
18 Aug 2021
@roosemberth:orbstheorem.chRoos joined the room.18:46:15
19 Aug 2021
@6aa4fd:tchncs.de6aa4fd joined the room.05:55:12
20 Aug 2021
@6aa4fd:tchncs.de6aa4fd set a profile picture.01:13:04
21 Aug 2021
@polykernel:kde.orgpolykernel left the room.01:51:10
22 Aug 2021
@yusdacra:nixos.devyusdacra changed their profile picture.15:49:00
23 Aug 2021
@susscrofa:matrix.orgsoiledit joined the room.02:28:12
24 Aug 2021
@mazurel:matrix.orgMazurel joined the room.14:09:20
25 Aug 2021
@mjolnir:nixos.orgmjolnir banned @matthewcroughan:defenestrate.itmatthewcroughan - nix.zone (<no reason supplied>).22:02:33
28 Aug 2021
@lvkm:matrix.orglvkm joined the room.06:30:54
@emmanuelrosa:matrix.orgemmanuelrosa joined the room.08:12:58
@emmanuelrosa:matrix.orgemmanuelrosa 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? 08:16:27
@roosemberth:orbstheorem.chRoos I don't know of an equivalent to nix-shell, but a more viable hack may be something based on nix-shell -E '(builtins.getFlake "github:nixos/nixpkgs").legacyPackages.${builtins.currentSystem}.hello'. 08:26:48
@emmanuelrosa:matrix.orgemmanuelrosa Which flake.lock does getFlake reference? 08:32:09
@roosemberth:orbstheorem.chRoos The one from the registry: nix registry list 08:34:59
@roosemberth:orbstheorem.chRoos(Or so I believe)08:35:15
@emmanuelrosa:matrix.orgemmanuelrosa 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:matrix.orgemmanuelrosa 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
@roosemberth:orbstheorem.chRoos 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:matrix.orgemmanuelrosaI see. Thanks @Roos.09:10:45
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

Show newer messages


Back to Room ListRoom Version: 6