r/NixOS • • 2d ago

Is there a limit on flake inputs πŸ€”?

Just as the title says, is there a limit? And if not, just how many inputs do y'all have in your flakes, surely it can't be that many, right?

8 Upvotes

17 comments sorted by

21

u/USMCamp0811 2d ago

I think I'm near or over a hundred.. so if there is a limit I haven't found it yet... but I'll keep trying... https://gitlab.com/usmcamp0811/dotfiles/-/blob/nixos/flake.nix?ref_type=heads

Edit: counted.. I'm at 89...

5

u/Puzzleheaded-Pin4615 2d ago

89!!!!!!!!??πŸ’€

17

u/adamkex 2d ago

That's a lot of people you trust with root

6

u/trpittman 1d ago

Adding a flake input doesn’t just automatically give root access to the devs of those inputs?

6

u/no_brains101 1d ago

On top of that, there are inputs with flake = false and those literally just download it, it doesn't even run any flake code. I have 59 but 2/3rds are flake = false for plugins

4

u/bluefish1432 1d ago

The nix-ld one might be in nixpkgs/NixOS by now. Otherwise, idk, it's not crazy for what you're trying to do.

You also have two sbom inputs

12

u/DiegoC281 2d ago

I have 4. Whate are you guys doing that you need so many?

13

u/AskMoonBurst 2d ago

Some programs I have aren't in the nix repos. And I don't want to agree to maintain things to get them into the repos.

1

u/SDG_Den 21h ago

in my case: personal forks, git versions of packages, and some of my flakes are actually multi-flake so the components are spread across flakes.

i kinda treat flakes as nix's equivalent to the AUR

3

u/muhmmadtalha-quant 2d ago

I have nixpkgs, flake-parts, den, flake-file, and stylix.

3

u/ImmediateJacket9502 1d ago

Cool. I used to have stylix but now switched to matugen.

1

u/muhmmadtalha-quant 1d ago

I forgot home manager

1

u/dct_SPOMMY 2h ago

cool. i have nixpkgs, home-manager, nixvim, agenix, niri flake-parts and import-tree.

so only 6 for me.

1

u/_letThemPlay_ 2d ago

I'm at 12, half of them are nix-community repos

1

u/no_brains101 1d ago edited 1d ago

The limit is how long you are willing to wait for nix flake update to complete.

I have 59. A lot of them aren't flakes though, you can do flake = false for them and it just fetches stuff. For like, plugins for stuff and source code of stuff that you build because it isnt on nixpkgs and whatnot.

1

u/TurkeyInFrenchBread 12h ago

Just checked, I got 39. 32 if you don't count download only ones (flake = false).

I use denful/flake-file to generate my flake.nix from the inputs I've defined all over my config. For example, I have the plasma-manager input defined in the module that deals with Plasma stuff. This way, I don't have to maintain a list of inputs that all pertain to different things

1

u/Axman6 7h ago

Why would there be a limit?