repl-overlays
/ PathSetting
: Support ~/
in paths #482
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#482
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
Currently, if I want to set a
repl-overlays
file in mynix.conf
, I have to use the absolute path. This makes it impossible to keep the file in my dotfiles repo, because I don't have the same username/homedir on all my machines.Describe the solution you'd like
I'd like to be able to set a
repl-overlays
value of~/.config/nix/repl.nix
in my~/.config/nix/nix.conf
and have it expand out my home directory. This probably shouldn't be allowed in/etc/nix/nix.conf
. (It would be nice to have this for the other settings that take paths, like the credential files setting.)Describe alternatives you've considered
Suffering, using
home-manager
to set the Nix configuration or my home directory declaratively (suffering), putting a symlink to my repl overlay in a consistent absolute path like/opt/nix/repl.nix
or something (suffering when it inevitably breaks and every Nix command fails).(Hi also!! Sorry I haven't been doing much for Lix lately!)
Discussed out-of-band with @jade: "yes do it, that's a ux improvement that has no negative consequences to the future".
Implementation strategy:
SetSettingSettings
struct with options like "relative paths allowed" and "tilde paths allowed"loadConfFile
allows tilde paths only innixUserConfFiles
getConfigDirs()
intogetUserConfigDir()
andgetOtherConfigDirs()
, so we know which one should be able to access tilde paths$HOME
pathConfig::set
andAbstractConfig::applyConfig
gain aSetSettingSettings
parameterPathSetting::parse
usesSetSettingSettings
to determine if relative or tilde paths should be resolved (and if so, from where)`repl-overlays`: Support `~/` in pathsto `repl-overlays` / `PathSetting`: Support `~/` in pathsStarting some work here, no timeline though: https://gerrit.lix.systems/c/lix/+/1851
Just waiting for reviews.
Closed with
02eb07cfd5
/cl/1864
!!!