-
Notifications
You must be signed in to change notification settings - Fork 11
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
Nix flake enablement for gardenlogin #73
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for the contribution.
I've added some feedback, but I'm not familiar with Nix. Generally, I'm wondering what problem we're trying to solve with yet another installer (to put it simply). Or are we just adding to the maintenance burden (hardcoded vendor hash that has to be updated on every dependency update, go version, nixos version)?
flake.nix
Outdated
version = lib.fileContents ./VERSION; | ||
splitVersion = lib.versions.splitVersion version; | ||
major = if ((lib.elemAt splitVersion 0) == "v") then lib.elemAt splitVersion 1 else lib.elemAt splitVersion 0; | ||
minor = if ((lib.elemAt splitVersion 0) == "v") then lib.elemAt splitVersion 2 else lib.elemAt splitVersion 1; | ||
gitCommit = if (self ? rev) then self.rev else self.dirtyRev; | ||
state = if (self ? rev) then "clean" else "dirty"; |
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.
splitVersion, major, minor can be repalced with lib.versions.major/minor.
As you can see in the syntax highlighting that no longer works, this is not really how nix does things but I think it would work. The idomatic nix way would be something like:
gitCommit = if (self ? rev) then
self.rev
else
self.dirtyRev;
Nix also allows things like |
The nix ecosystem allows for a simplified developer onboarding and enhanced team productivity. There are already teams that use nix for this purpose and have created nix functions/packages for all our gardentools. Let's be frontrunners and not laggards.
Let's tackle that issue in a next step. |
What this PR does / why we need it:
We want to enable gardenlogin for the nix community.