-
Notifications
You must be signed in to change notification settings - Fork 624
add a nix flake #2518
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
add a nix flake #2518
Conversation
Signed-off-by: Troy Benson <[email protected]>
nbp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with the .envrc files, and I am not fond of pulling online resources when doing local development. However this file might be slightly outdated (3.0.7 -> 3.1.0) compared to https://github.com/nix-community/nix-direnv/blob/master/templates/flake/.envrc
Overall the flake looks good.
I would not have included the NixOS / HomeManager modules only for registering the flake output as part of the system packages, unless there was some added value such as registering a systemd jobs for starting the sccache server.
I will also note that the lack of overlay for the definition of packages imply that this flake creates an additional instances of Nixpkgs (line 54: import nixpkgs) when using any of the modules, which is a bad practice.
On another note, I am surprise that rustup now works in nix develop shells, but I guess things sometimes get fixed by not looking at them for about 10 years.
direnv basically initializes the shell when entering the directory. Also plays nice with vscode using the https://marketplace.visualstudio.com/items?itemName=mkhl.direnv extension which causes all of the other vscode extensions to inherit the nix dev shell. (such as rust-analyzer) Hmm, i see the latest release is https://github.com/nix-community/nix-direnv/releases/tag/3.0.7, but i see the 3.1.0 tag so i think they just forgot to create a git release for it. I'll update.
I think thats out of scope for this. I'll remove them.
I think I fixed it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds good to me!
I could be pedantic about the differences between final and prev for pulling library functions, but this has no impact today …
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2518 +/- ##
=======================================
Coverage 71.04% 71.04%
=======================================
Files 64 64
Lines 35369 35369
=======================================
+ Hits 25128 25129 +1
+ Misses 10241 10240 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Not sure if wanted, can close if not.
Adds nix flake so that nix shells can inherit the required tooling to build / develop the project.
developer env usage
package building
The nix flake also adds the package building process used by end users (separate component can be removed).
module integration