the-nix-way / dev-templates

Dev environments for numerous languages based on Nix flakes [maintainer=@lucperkins]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automate update flake.lock

SolidRhino opened this issue · comments

Can you please add a workflow to the .github/workflows directory that automatically update the flake lock files? So if you initialize a template (for example rust) you get the newest version?

I was running into the same issue. However I'm not sure why the flake.lock file needs to be part of the template at all. I removed the lock file in my fork and it seems to be working fine. This way the lock file is generated when nix develop is run for the first time, automatically locking all packages to the latest available version.

I'm new to nix so maybe I'm missing something. If not I am happy to create a PR removing all lock files.

@Wasabi375 In general I like keeping the flake.lock because some packages may be available in some revisions of Nixpkgs but not others (several packages have been removed or renamed over the life cycle of this project). Updating the flake.lock is also trivial (nix flake update).

@SolidRhino I'd prefer to keep things the way they are. As it stands, when you initialize a template you get a dev environment that is known to work, and if you need to update your flake inputs you can do so with nix flake update.