Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple inputs, unsure if used #44

Open
webframp opened this issue Aug 23, 2023 · 1 comment
Open

Multiple inputs, unsure if used #44

webframp opened this issue Aug 23, 2023 · 1 comment

Comments

@webframp
Copy link

Hey, greetings! Thanks for these configs and your repo at https://github.com/Misterio77/nix-config

It's helped me get a bit better with using nix+flakes to manage my systems.

One issue I'm seeing is that I have a few inputs I'm unclear if I'm using properly (emacs-overlay mainly) and I'm curious about the updates that show several inputs being updated, as in this example::

What methods do you use to debug inputs/outputs to ensure they're in use, etc. I don't expect you to be able to review my dotfiles much but was curious if you knew of any common mistakes people make, perhaps that I've made.

feel free to close if you have no time to answer and thanks again for this repo.

@Misterio77
Copy link
Owner

Hey! Sorry for the delayed response.

It's helped me get a bit better with using nix+flakes to manage my systems.

Glad I could help :D

several inputs being updated

It's mostly due to flakes being kinda of like graphs. Just like you depend on nixpkgs, emacs-overlays also does. You can use follows to sync them, so that you can (for example) always use a single nixpkgs version.

What methods do you use to debug inputs/outputs to ensure they're in use, etc.

Hmmm afaik there's no tools for that ATM.

was curious if you knew of any common mistakes people make

I think the most common mistake with flake inputs is whether to use follows or not. There's no silver bullet, but as a rule of thumb:

  • If you're consuming a flake for modules, you usually want to sync their nixpkgs with yours. If they rely on older hm/nixos modules for them to work, they will not work with your system regardless (as your hm/nixos config disregards their usage of hm/nipkgs, if that makes sense)
  • If you're consuming a flake for packages, it depends. For better reproductibility, it usually is best to keep their nixpkgs instance untouched. However, if it's something "deeply" integrated with your config, it's usually best to use the same nixpkgs as you do (for better disk usage, etc).

I personally use follows with everything, except for packages I want to not make sure are not breaking (e.g. services).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants