8000 GitHub - bryango/flakes: manage "dirty" flakes
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bryango/flakes

Repository files navigation

flakes

A hack to efficiently install the flakes maintained at my home.

This is for:

  • "dirty" (local, temporary) flakes and packages
  • ... that I currently maintain and install
  • ... but do not want in my home-manager profile

It basically tries to reinvent the "dirtiness" of nix-env and nix-channel with flakes.

Why? Here are some facts:

  • each project has to be in its own git repository
  • each package carries along its own dependencies, e.g. nixpkgs
  • nix is terrible with git submodules, at least for now
    (this is fixed as of nix v2.23.3)

Without this hack, we have the following problems:

  • there will be N copies of deps, e.g. nixpkgs floating in my system
  • bringing them up to date requires many cds and nix flake updates

This flake solves the problem by:

  • gathering all these packages into a single env so I can nix profile install all of them
  • redirecting common dependencies e.g. nixpkgs to the nix registry so I can nix flake update all of them
  • in fact, nix flake update is in .envrc so the flake inputs are automatically synced with the local nix registry
  • circumventing the submodule issues with a separate --git-dir at some other location
    (this is now obsolete since nix v2.23.3)

no home-manager

I do use home-manager but these are the temporary packages I specifically do not want to keep track of. We are emulating the cursed nix-env & nix-channel functionality, where things are dirty yet efficient.

About

manage "dirty" flakes

Resources

License

Stars

Watchers

Forks

0