<emily> abathur: does empty /etc/synthetic.d exist on big sur?
supersandro2000 has quit [Ping timeout: 246 seconds]
<emily> `/usr/local/bin /usr/bin /bin /usr/sbin /sbin $HOME/.nix-profile/bin /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /Library/Apple/usr/bin /Users/emily/.nix-profile/bin /etc/profiles/per-user/emily/bin`
<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> `/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util | grep -- -B` !
<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 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nix-darwin
<emily> not sure if nixpkgs would be happy including this
kalbasit has joined #nix-darwin
<emily> does anyone have a working nix-darwin flakes setup they could share/point to?
kalbasit has quit [Ping timeout: 240 seconds]
<LnL> there's an example in the repo
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nix-darwin
__monty__ has joined #nix-darwin
<supersandro2000> Can I use the work around from here https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-sdk/default.nix#L228 for fatal error: 'simd/simd.h' file not found ?
<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
<supersandro2000> for all people using nixpkgs-review on Darwin this should be very helpful https://github.com/Mic92/nixpkgs-review/pull/142
<{^_^}> Mic92/nixpkgs-review#142 (by SuperSandro2000, 6 minutes ago, open): Add platform run on to report
<supersandro2000> If there are any other suggestions that are generally useful please let me know
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nix-darwin
kalbasit has joined #nix-darwin
philr has quit [Ping timeout: 272 seconds]
heywoodlh has joined #nix-darwin
<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> heywoodlh: https://gist.github.com/antifuchs/160e25259067bfcb89b47eb67110130c is what I use, note the `open -gjWa`
<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> but with homemanager I guess
<abathur> off topic, the search https://github.com/search?q=language%3Anix+osascript&type=code is probably a good resource for advanced nix macOS config... :)
<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
<LnL> you can find the source releases here https://opensource.apple.com/release/macos-10136.html
<LnL> but we have to mix and match a bit sometimes since apple isn't very consistent in releasing stuff
<supersandro2000> I put this on my todo after pyobjc
<supersandro2000> if anyone wants to work on this together let me know
<LnL> just updating the ones which are currently 10.12 is probably a good first step
<LnL> most of those are the ones needed using bootstrapping
<supersandro2000> thanks for the hints. I'll try to do this the next days
<supersandro2000> my current bottle neck is the available macos compute power
<LnL> as for working on the stdenv, going step by step using __bootPackages makes things a bit easier
<LnL> so nix-build -A stdenv.__bootPackages.stdenv is stage4, stdenv.__bootPackages.stdenv.__bootPackages.stdenv is stage3 and so on
<supersandro2000> that is what I searched for
<LnL> not sure at what point eg. darwin.Libc gets involved but that's probably one of the first things
<LnL> I also just noticed most of the darwin.*_cmds are still on 10.11
<supersandro2000> 😂 more updates, more bugs
<LnL> that's not a big deal but maybe we should also update those at some point
<supersandro2000> I try to do them, too
<LnL> (if somebody doesn't know what to do :))
<supersandro2000> but first 10.12
<supersandro2000> one commit per package and then we'll see
<LnL> other stuff that's still on 10.11 or 10.10 is probably because it's not released anymore
<supersandro2000> noted
Ericson2314 has joined #nix-darwin
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bsima has quit [*.net *.split]
bsima has joined #nix-darwin
__monty__ has quit [Quit: leaving]
philr has joined #nix-darwin
kalbasit has quit [Ping timeout: 240 seconds]
<supersandro2000> I really hope Apple releases even more frameworks
<supersandro2000> there are not enough already