Nix Flakes | 897 Members | |
| 182 Servers |
| Sender | Message | Time |
|---|---|---|
| 7 Dec 2023 | ||
And what goes in the ...? :P Because right now I also don't know where to actually grab the parent config from | 09:59:48 | |
I'm also curious about how import inputs.x works. I thought input.x is an attribute set referring to the outputs of the flake you've imported. But it's also an import path referring to the source of what you've imported?! | 10:03:23 | |
i guess if you just want to allow unfree packages you can do unstable = import inputs.unstable { config.allowUnfree = true; } | 10:04:19 | |
In reply to @avaq:matrix.orgnot sure, i'm still figuring out this stuff too, but i think it should work because by the time overlays are being evaluated the system is already known | 10:05:09 | |
i think your overlay could look like final: prev: { unstable = import inputs.unstable { inherit (prev) system config; } but you might get away with omitting system | 10:06:59 | |
In reply to @avaq:matrix.orgflakes are attribute sets with _type = "flake", but when coerced to a string (builtins.toString) or a path (builtins.toPath) they resolve to the flake's store path | 10:08:18 | |
| uhh my nixpkgs needs to inherit system arch... | 10:09:37 | |
In reply to @petrichor:envs.netAh, okay! Clear! | 10:10:40 | |
In reply to @petrichor:envs.netThat's working! My system builds! :D | 10:14:50 | |
| Jez (he/him) ♾️: Deployed and booted the flake system. Thanks for the help :) | 11:14:10 | |
| * Jez (he/him) ♾️: Deployed and booted the flake systems. Thanks for the help :) | 11:14:27 | |
| 8 Dec 2023 | ||
| 15:25:50 | ||
| 19:18:59 | ||
| 9 Dec 2023 | ||
| 05:18:46 | ||
| 10 Dec 2023 | ||
In reply to @janik0:matrix.orgAs promised, even so it took some time but here it is: https://discourse.nixos.org/t/announcing-nixos-dns/36702 | 21:47:19 | |
| 11 Dec 2023 | ||
| 12:49:14 | ||
| When using flakes to manage my system, and having `nixos-unstable` and `home-manager` as inputs, I have to call `sudo nixos-rebuild switch --flake some/path`. Now, that command sometimes downloads around 300 MB of data before actually doing the build (around 150 MB for unstable I suppose, and 148 MB for home-manager). Is it possible to avoid having to wait for that every time? I suppose it might do the downloading when I run `sudo nix-collect-garbage -d` and reboot. (Copied from NixOs, this room might be more suitable for this question) | 12:50:37 | |
In reply to @ryoschin:matrix.org you can try with --offline then it will try to run any
that pins any | 13:04:24 | |
In reply to @janik0:matrix.orgBut my problem is in that sudo nix-collect-garbage -d deletes the sources, and sudo nixos-rebuild switch --flake some/path has to download them again (I suppose that is because they count as cache, so it clears them). I need the gc to not clear them, and the rebuild command to download them only if there is an actual update | 15:14:32 | |
In reply to @janik0:matrix.org* But my problem is in that sudo nix-collect-garbage -d deletes the sources, and sudo nixos-rebuild switch --flake some/path has to download them again (I suppose that is because they count as cache, so it clears them). I need the gc to not clear them, and the rebuild command to re-download them only if there is an actual update | 15:14:57 | |
In reply to @ryoschin:matrix.orgif you add those flakes to the local registry then they will not be collected alternatively I guess you can add them to system.extraDependencies | 15:17:08 | |
In reply to @ryoschin:matrix.orgThere was some setting like keepDerivations or something to prevent that but I'm not at my laptop currently. | 15:17:28 | |
In reply to @2xsaiko:tchncs.deI see. Mind sharing the process? | 15:55:51 | |
In reply to @janik0:matrix.orgYup, there is such an option, but I did not fully understand what it does. Does it keep all the packages I install even if they are not needed anymore, or just keep the two things I needed not to be garbage collected? | 15:57:03 | |
| So, as far as I can tell now, all I need to do is make the flake a GC root, right? So, how do I do that... | 16:07:28 | |
In reply to @ryoschin:matrix.orgI don't know but direnv does this, so you can check how they do it. | 17:00:32 | |
| Alright, I think I managed to apply direnv to this | 17:20:26 | |
In reply to @ryoschin:matrix.orgnix.registry.nixpkgs.flake = inputs.nixpkgs (like Janik said) or system.extraDependencies = [inputs.nixpkgs] | 18:04:20 | |
| 12 Dec 2023 | ||
| i've been looking into this again after some time away, and still can't really find anything: is there a way to exclude one directory from my flake? specifically we have a giant folder of reference PDFs checked into our source tree, and copying them every time a flake is built makes our development shell unusable. this is why we're currently running non-flake nix, but I would love to be able to switch | 08:48:26 | |
| side note: these files are not needed from our nix build, they are just for test runs | 08:49:27 | |