Use known folders for nix data on windows#14973
Merged
Conversation
b09e9ba to
93b4260
Compare
Ericson2314
approved these changes
Jan 11, 2026
puffnfresh
reviewed
Jan 11, 2026
Member
|
Good point this might be useful for msys2/MINGW-packages#22499 |
7e2502a to
0777ac0
Compare
It does not belong in libutil.
89218c8 to
8bf2f1d
Compare
xokdvium
commented
Jan 16, 2026
xokdvium
commented
Jan 16, 2026
This is the usual conventions on windows. See https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid and https://github.com/adrg/xdg for examples of the mapping of XDG paths to Windows known folders. Additionally, on Windows, this allows us to dispense with a hard-coded default for `nixConfDir`, which is both nice (fewer compile-time configuration options) and necessary, because we don't know what drive the `ProgramData` directory will live on. Tested on wine. Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
8bf2f1d to
5d29385
Compare
Ericson2314
approved these changes
Jan 16, 2026
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
This is the usual conventions on windows.
See https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid and https://github.com/adrg/xdg for examples of the mapping of XDG paths to Windows known folders.
Tested on wine.
Sample output:
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.