Skip to content

add nix flake - #216

Open
me-it-is wants to merge 1 commit into
frcsoftware:mainfrom
me-it-is:add-nix-flake
Open

add nix flake#216
me-it-is wants to merge 1 commit into
frcsoftware:mainfrom
me-it-is:add-nix-flake

Conversation

@me-it-is

@me-it-is me-it-is commented Aug 31, 2026

Copy link
Copy Markdown

Description

Add a nix flake that provides a dev-shell for development. This makes it so that someone doing development on nixos or who is using nix as their packages manager doesn't have to keep their own copy of this flake or some other Dev shell.

Meta

currently the flake uses the wrong version of pnpm(10.34.5 rather than 10.16.0) because, nixpkgs only contains the most up to date pnpm for each major version. These are the options that i have thought of

  1. ignore the version mismatch, pnpm re-downloads the correct version anyway but then you have two copies of pnpm taking up space on you machine
  2. update the repos pin to 10.34.5, the nix flake wont do any kind of auto update so we wont have to keep changing the pin
  3. same as 1 but also turn off the auto download, this doesn't download a second copy of pnpm but adds the potential of incompatibility (this shouldn't happen if we trust pnpm to follow SEMVAR)
  4. override the source of the pnpm package to be an older version of pnpm, this could break if the build process changed at all between the latest 10.x and 10.16.0 and would require the user to build pnpm from source (it would be done automatically but still)
  5. pull in the last version of nixpkgs that had pnpm 10.16.0, same thing with building from source but would also require rebuilding whatever dependencies have changed (which given that 10.16.0 was released almost a year ago is basically everything)

One other question that i have whether i should add formatting for the flake in ci or any of the documentation, my logic for not was that these files dont get edited often and to format them requires a nix installation witch would be a pain in ci and also impossible for anyone on windows as nix doesn't support it.

Merge checklist:

Comment thread flake.nix
packages = with pkgs; [
nodejs_24
pnpm_10
vale

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vale dependency is being managed by npm:@vvago/vale

Comment thread flake.nix
default = pkgs.mkShell {
packages = with pkgs; [
nodejs_24
pnpm_10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the versions will mismatch in any case, might as well use latest, in case it installs the correct version faster somehow?

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

Successfully merging this pull request may close these issues.

2 participants