nixos/etc: make sure local "source" files are imported to the store#136474
Merged
nrdxp merged 1 commit intoNixOS:masterfrom Sep 2, 2021
Merged
nixos/etc: make sure local "source" files are imported to the store#136474nrdxp merged 1 commit intoNixOS:masterfrom
nrdxp merged 1 commit intoNixOS:masterfrom
Conversation
The treatment of the "source" parameter changed with eb7120d, breaking stuff. Before that commit, the source parameter was converted to a string by implicit coercion, which would copy the file to the store and yield an string containing the store path. Now, by the virtue of escapeShellArg, toString is called explicitly on that path, which will yield an string containing the absolute path of the file. This commit restores the old behavior.
Mic92
approved these changes
Sep 2, 2021
Member
Mic92
left a comment
There was a problem hiding this comment.
untested but explanation and code makes sense to me.
Contributor
Author
|
A somewhat extended explanation why I think this fix is the proper way to deal with the situation is also here: |
nrdxp
approved these changes
Sep 2, 2021
nrdxp
left a comment
There was a problem hiding this comment.
Tested your functions in a repl to ensure they produce the desired effect for my system config. Everything checks out. Good work!
Mic92
added a commit
to Mic92/not-os
that referenced
this pull request
Sep 3, 2021
This reverts commit ff6ea50. No longer needed since NixOS/nixpkgs#136474
Mic92
added a commit
to Mic92/not-os
that referenced
this pull request
Sep 3, 2021
This reverts commit ff6ea50. No longer needed since NixOS/nixpkgs#136474
11 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
The treatment of the "source" parameter changed
with eb7120d, breaking stuff.
Before that commit, the source parameter was converted to a
string by implicit coercion, which would copy the file to the
store and yield an string containing the store path. Now, by
the virtue of escapeShellArg, toString is called explicitly on
that path, which will yield an string containing the absolute
path of the file.
This commit restores the old behavior.
Things done
/etc/looks fine on NixOS