repl-overlays / PathSetting: Support ~/ in paths				#482
		
		
	
	
		Labels
		
	
	
	
	No labels
	
		
			
	
	Affects/CppNix
		
			Affects/Nightly
		
			Affects/Only nightly
		
			Affects/Stable
		
			Area/build-packaging
		
			Area/cli
		
			Area/evaluator
		
			Area/fetching
		
			Area/flakes
		
			Area/language
		
			Area/lix ci
		
			Area/nix-eval-jobs
		
			Area/profiles
		
			Area/protocol
		
			Area/releng
		
			Area/remote-builds
		
			Area/repl
		
			Area/repl/debugger
		
			Area/store
		
			bug
		
			Context
contributors
		
			Context
drive-by
		
			Context
maintainers
		
			Context
RFD
		
			crash 💥
		
			Cross Compilation
		
			devx
		
			docs
		
			Downstream Dependents
		
			E/easy
		
			E/hard
		
			E/help wanted
		
			E/reproducible
		
			E/requires rearchitecture
		
			Feature/S3
		
			imported
		
			Language/Bash
		
			Language/C++
		
			Language/NixLang
		
			Language/Python
		
			Language/Rust
		
			Needs Langver
		
			OS/Linux
		
			OS/macOS
		
			performance
		
			regression
		
			release-blocker
		
			stability
		
			Status
blocked
		
			Status
invalid
		
			Status
postponed
		
			Status
wontfix
		
			testing
		
			testing/flakey
		
			Topic/Large Scale Installations
		
			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…
	
	Add table
		Add a link
		
	
		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-overlaysfile 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-overlaysvalue of~/.config/nix/repl.nixin my~/.config/nix/nix.confand 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-managerto 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.nixor 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:
SetSettingSettingsstruct with options like "relative paths allowed" and "tilde paths allowed"loadConfFileallows tilde paths only innixUserConfFilesgetConfigDirs()intogetUserConfigDir()andgetOtherConfigDirs(), so we know which one should be able to access tilde paths$HOMEpathConfig::setandAbstractConfig::applyConfiggain aSetSettingSettingsparameterPathSetting::parseusesSetSettingSettingsto determine if relative or tilde paths should be resolved (and if so, from where)repl-overlays: Support~/in pathsrepl-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!!!