| 11 Dec 2023 |
@ryoschin:matrix.org | In reply to @2xsaiko:tchncs.de if you add those flakes to the local registry then they will not be collected
alternatively I guess you can add them to system.extraDependencies I see. Mind sharing the process? | 15:55:51 |
@ryoschin:matrix.org | In reply to @janik0:matrix.org There was some setting like keepDerivations or something to prevent that but I'm not at my laptop currently. Yup, 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 |
@ryoschin:matrix.org | 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 |
mr-qubo | In reply to @ryoschin:matrix.org 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... I don't know but direnv does this, so you can check how they do it. | 17:00:32 |
@ryoschin:matrix.org | Alright, I think I managed to apply direnv to this | 17:20:26 |
@2xsaiko:tchncs.de | In reply to @ryoschin:matrix.org I see. Mind sharing the process? nix.registry.nixpkgs.flake = inputs.nixpkgs (like Janik said) or system.extraDependencies = [inputs.nixpkgs] | 18:04:20 |
| 12 Dec 2023 |
peacememories (Old) | 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 |
peacememories (Old) | side note: these files are not needed from our nix build, they are just for test runs | 08:49:27 |
@janik0:matrix.org | In reply to @peacememories:matrix.org 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 maybe this helps? https://github.com/hercules-ci/gitignore.nix | 09:08:56 |
peacememories (Old) | i don't believe so. for one, the files are not gitignored because they are meant to be versioned. also, I think this would only work when including a separate directory from my flake? right now the flake is at the root of the repository, so the whole repo is copied into the store before I can do anything with it. I think some people are putting their flake into a subdirectory to work around this? Maybe that's workable for me as well. Still hoping the lazy trees MR gets merged at some point^^ | 09:25:35 |
peacememories (Old) | okay, a subfolder alone does not do anything since nix still recognizes the repository root as "the flake" and copies the entire tree. at least that's what it looks like | 09:52:53 |