-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
modules/files: fix creating configs of vim type #1891
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! Definetely better to address this before dealing with the other PRs.
Would you mind addressing my nit about using just one let
block?
I'll run tests locally, to be sure, then I'm happy to merge!
plugin = helpers.writeLua derivationName config.content; | ||
plugin = | ||
let | ||
writeContent = if config.type == "lua" then helpers.writeLua else pkgs.writeText; |
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 think it's more readable with this in the same let block as derivationName
.
Also: in #1889 I named the function writer
, although that's not really important. writeContent
is fine, just a little verbose.
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.
Maybe I'm wrong, but isn't a verb better in that case? I named it by analogy to writeLua
and writeText
.
Also, could you rebase on |
Update: |
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.
Great, thanks!
This PR is a fix extracted from #1886. Since #1889 also fixes that, maybe this PR is redundant. But at least tests are fixed here (I think that
files.nix
was placed in the wrong directory, because I didn't find any reference to it). Also added a test case for the error this is fixing. Feel free to close if #1889 is merged earlier.