Add system.defaults.NSGlobalDomain.AppleIconAppearanceTheme (#1593)

This commit is contained in:
Michael Hoang 2025-09-20 16:52:53 +00:00 committed by GitHub
commit 7be9c1b136
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View file

@ -52,6 +52,19 @@ in {
'';
};
system.defaults.NSGlobalDomain.AppleIconAppearanceTheme = mkOption {
type = types.nullOr (types.enum [ "DarkRegular" "DarkAutomatic" "ClearLight" "Clear Dark" "Clear Automatic" "TintedLight" "TintedDark" "TintedAutomatic" ]);
default = null;
description = ''
Set icon and widget style
To set to default mode, set this to `null` and you'll need to manually run
{command}`defaults delete -g AppleIconAppearanceTheme`.
This option requires logging out and logging back in to apply.
'';
};
system.defaults.NSGlobalDomain.AppleInterfaceStyleSwitchesAutomatically = mkOption {
type = types.nullOr types.bool;
default = null;

View file

@ -18,6 +18,11 @@ launchctl asuser "$(id -u -- test-defaults-user)" sudo --user=test-defaults-user
<plist version="1.0">
<true/>
</plist>'
launchctl asuser "$(id -u -- test-defaults-user)" sudo --user=test-defaults-user -- defaults write -g AppleIconAppearanceTheme '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<string>DarkRegular</string>
</plist>'
launchctl asuser "$(id -u -- test-defaults-user)" sudo --user=test-defaults-user -- defaults write -g AppleKeyboardUIMode '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

View file

@ -26,6 +26,7 @@
system.defaults.NSGlobalDomain.AppleEnableMouseSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleEnableSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleFontSmoothing = 1;
system.defaults.NSGlobalDomain.AppleIconAppearanceTheme = "DarkRegular";
system.defaults.NSGlobalDomain.AppleICUForce24HourTime = true;
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = true;