1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-09-11 12:49:18 +03:00

defaults-write: formatting

This commit is contained in:
Chris Montgomery 2021-12-24 17:20:15 -05:00
parent 5851d9613e
commit f07acb443a
No known key found for this signature in database
GPG Key ID: A6BA9BA2FDA7C997

View File

@ -37,13 +37,18 @@ let
magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse;
magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse;
mkIfAttrs = list: mkIf (any (attrs: attrs != {}) list);
mkIfAttrs = list: mkIf (any (attrs: attrs != { }) list);
in
{
config = {
system.activationScripts.defaults.text = mkIfAttrs [ alf loginwindow smb SoftwareUpdate ]
system.activationScripts.defaults.text = mkIfAttrs [
alf
loginwindow
smb
SoftwareUpdate
]
''
# Set defaults
echo >&2 "system defaults..."
@ -54,7 +59,19 @@ in
'';
system.activationScripts.userDefaults.text = mkIfAttrs
[ NSGlobalDomain GlobalPreferences LaunchServices dock finder screencapture spaces trackpad trackpadBluetooth magicmouse magicmouseBluetooth ]
[
NSGlobalDomain
GlobalPreferences
LaunchServices
dock
finder
screencapture
spaces
trackpad
trackpadBluetooth
magicmouse
magicmouseBluetooth
]
''
# Set defaults
echo >&2 "user defaults..."