LnL7 / nix-darwin

nix modules for darwin
MIT License
3.11k stars 449 forks source link

Launchd types Catch-22 #232

Open toonn opened 4 years ago

toonn commented 4 years ago

I was trying to setup a user LaunchAgent and I got stuck between a rock and a hard place. The type for this option and this validation for pretty-printing aren't compatible and make it impossible to specify StandardError/In/OutPath.

LnL7 commented 4 years ago

Could you clarify what the error is and what value you are trying to use?

All that types.path does is validate that the string starts with a /. So this check makes sense since launchd does not expand ~ or variables as far as I know.

toonn commented 4 years ago

I think the confusion stems from assuming types.path is the type of path-expressions in nix, which can very well be relative. Maybe the error message can be updated to mention it needs an absolute path?