apple’s desktop platform. my posts about it generally fall into one of two categories: tracking down bugs or doing complex configuration
I’m in the process of moving as many of the installed packages and as much of the configuration of my Mac to nix-darwin. Among the packages that I want on my Mac are various versions of JDKs1. The way that macOS interacts with JDKs is a bit tricky, so the standard Nix or nix-darwin install doesn’t work, but we can make it work.
My Mac is set up to sync its light/dark mode with the local sunset, so it is in light mode through most of the day, and in dark mode later at night. All my apps sync with the system as well, including my terminal and terminal applications. However, what doesn’t sync is SSH sessions. If I SSH into one of my Mac Minis, and then run a command such as bat
(which on my Mac is aliased to bat --theme=$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo Catppuccin-mocha || echo Catppuccin-latte)
and thus respects dark mode), it always acts as if it is in dark mode (because the Mac Mini is in dark mode).
This article is dedicated to Alex, for this glowing review and proving the inspiration to finish this post.
I use Tailscale to connect all my devices to each other. In general, this is great. I can access all my machines from anywhere, through NAT, without messing with my firewall, by hostname. And that’s just the base level. I’m not here to be a Tailscale ad — go check out their website if you want to know more. Sometimes I want to use a VPN to anonymize my internet traffic, though, and Tailscale does not (currently) support that.
As I’ve mentioned before, I have a bunch of Mac Minis running NixOS hosting various services. I have SSH access set up to them all with my SSH key, but I don’t have access to my GPG keys on those machines. And since these are the only NixOS machines that I have, things like updating my flake lockfile become annoyingly complicated:
The first time you use sudo
on a macOS system (it’s probably been so long you don’t even remember it!), you’re presented with the following dialog:
```
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type “man sudo” for more information.
The Swift Package Manager (SPM) is pretty great. You can use it to create libraries, command-line tools, and (since Xcode 11), SPM libraries can be used in apps submitted to Apple App Stores. However, it’s not as trivial to make true graphical apps without using Xcode, even if they’re written in Swift using SPM.