<emily>
probably not actually possible to use /etc/paths.d because of the lack of expansion, sad
<emily>
today I learned: launchctl config user path
<emily>
it only supports PATH though
<emily>
`launchctl config user path ...` for PATH and `launchctl setenv ...` for the rest at activation time is probably pretty good, I might try and hack that up
<emily>
maybe as an experimental `environment.useLaunchd` option?
<emily>
er, probably rather both system and user to handle the per-user paths and non-per-user ones
supersandro2000 has joined #nix-darwin
<emily>
also just to make things extra usable and convenient you have to reboot
<abathur>
emily no, that would be too kind for them :[
<emily>
abathur: you can check whether apfs.util supports the catalina or big sur option and base it on that :P
<emily>
the best way to detect the OS version ever
supersandro2000 has quit [Disconnected by services]
supersandro2000 has joined #nix-darwin
<abathur>
yeah
<abathur>
I've been thinking it'd be possible to add the /etc/synthetic.d/nix file, run both of those, and then try the 2nd if ! -d /nix
<abathur>
but, again, I feel like why add even more code to support it :(
<emily>
because /etc/synthetic will get overridden on OS upgrades probably
<emily>
and .d won't
<emily>
is my guess
<emily>
ISTR that's true of /etc/paths
Chiliparrot has quit [Ping timeout: 260 seconds]
<abathur>
I guess actually what I thought was
<abathur>
write /nix
<abathur>
try to stitch
<abathur>
eh, I dunno, hard to know what to do with it
<abathur>
I was thinking maybe cat everything together and sort -u but I guess there are comments to worry about
Chiliparrot has joined #nix-darwin
<emily>
it seems like `launchctl setenv ...` works fine for GUI apps and doesn't require a reboot
<emily>
but it can't set PATH :(
<emily>
ok, my conclusion is that there is no way to affect the PATH of spawned GUI apps in a way that doesn't require a reboot afterwards
<emily>
sad
<emily>
and from what I can tell, /etc/paths.d doesn't even affect GUI apps either
<emily>
what is the point of all this machinery
<emily>
LnL: afaict checking for PATH before calling path_helper won't work because the PATH will actually be whatever the configured launchd path is, which there is no documented way of checking
<emily>
but is `/usr/bin:/bin` out of the box
<emily>
I'm thinking probably the best thing to do is for nix-darwin's `programs.fish` to simply make a copy of the fish package with a patch applied to `share/fish/config.fish`
<emily>
oh, that won't work without a rebuild because it probably hardcodes all the self-references, ugh
<emily>
my best idea right now is just to have nixpkgs carry a patch that checks for some __NIX_PLEASE_DONT_MANGLE_PATH before doing the path_helper stuff. which is pretty gross
<supersandro2000>
'/nix/store/w3z7nx6cf59gs09r8afhljm7kf0093lf-apple-framework-GameKit/Library/Frameworks/GameKit.framework/Headers/GameKit.h:9:9: fatal error: 'simd/simd.h' file not found
<supersandro2000>
🤔
<supersandro2000>
I think I got it
<supersandro2000>
boy o boy. I have the feeling apple_sdk is missing a lot of dependencies
<heywoodlh>
Is there a way with configuration.nix to specify Login Items (startup applications) without me having to create a launchd service?
<heywoodlh>
I didn't see anything in `man configuration.nix` that looked obvious for startup applications.
<abathur>
hmm
<abathur>
I'm not already familiar login items, so I'm probably just sanity-checking/rubber-ducking for you; a little naive searching didn't turn up any obvious evidence of someone doing it
<abathur>
it sounds like there are two different approaches; Service Management Framework looks to be something the app developer would have to do, so I assume you mean the "Shared File List" approach?
<antifuchs>
I use the Launch Agent functionality for starting apps; there's a particular `open` commandline that works for this
<antifuchs>
I realize it's not what you asked for, but I think that this is the only way nix can realistically manage those /:
<abathur>
after reading a bit I think search is misleading me, and that heywoodlh is asking about controlling System Preferences > Users & Groups > <user> > Login Items
<abathur>
I am finding some shell scripts that do this; surveying now but so far many of the matches are using osascript for this
<abathur>
meh, I did find someone using the osascript approach in Nix, though at the high cost of undermining my confidence in github's ability to match a quoted multi-word string in code search
<abathur>
still not really sure where they're stored; I did find a much older script (like, nearly 20 years) doing something like this with a number of files, but ~/Library/Preferences/loginwindow.plist is the only one of the files it touched that I see on my system, and I don't see anything about login items in it
<abathur>
unless the system is auto-cleaning the login items, I guess the Nix example above would append every time you activate? some of the plain shell examples I found do look a little more robust and might provide a foundation for something idempotent; I'll list a few
<supersandro2000>
LnL: You around? Can you give me some general advice how to update apple source release? Which commands/builds need to pass for it to work?
<supersandro2000>
I hope there is an easier way than building every package by its won in pkgs/os-specific/darwin/apple-source-releases