diff options
| author | Simon Holywell <simon@holywell.com.au> | 2019-11-04 14:06:54 +1000 |
|---|---|---|
| committer | Simon Holywell <simon@holywell.com.au> | 2019-11-04 14:35:21 +1000 |
| commit | 626a112ce3c7a2c6944252d28bda930302bd6cd5 (patch) | |
| tree | 3184fb6d979a73dc8d0aae403af29b06a8863db8 | |
| parent | 400a367d4ef48564cc85ce61c6d2e3f3a751b0d9 (diff) | |
adds com.apple.spaces
| -rw-r--r-- | modules/module-list.nix | 1 | ||||
| -rw-r--r-- | modules/system/defaults-write.nix | 4 | ||||
| -rw-r--r-- | modules/system/defaults/spaces.nix | 20 |
3 files changed, 24 insertions, 1 deletions
diff --git a/modules/module-list.nix b/modules/module-list.nix index b36d85c..0a777ab 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -16,6 +16,7 @@ ./system/defaults/screencapture.nix ./system/defaults/alf.nix ./system/defaults/smb.nix + ./system/defaults/spaces.nix ./system/defaults/trackpad.nix ./system/etc.nix ./system/keyboard.nix diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix index bf9f2f4..d413dc5 100644 --- a/modules/system/defaults-write.nix +++ b/modules/system/defaults-write.nix @@ -29,6 +29,7 @@ let alf = defaultsToList "/Library/Preferences/com.apple.alf" cfg.alf; smb = defaultsToList "/Library/Preferences/SystemConfiguration/com.apple.smb.server" cfg.smb; screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture; + spaces = defaultsToList "com.apple.spaces" cfg.spaces; trackpad = defaultsToList "com.apple.AppleMultitouchTrackpad" cfg.trackpad; trackpadBluetooth = defaultsToList "com.apple.driver.AppleBluetoothMultitouch.trackpad" cfg.trackpad; @@ -47,7 +48,7 @@ in ''; system.activationScripts.userDefaults.text = mkIfAttrs - [ NSGlobalDomain GlobalPreferences LaunchServices dock finder screencapture trackpad trackpadBluetooth ] + [ NSGlobalDomain GlobalPreferences LaunchServices dock finder screencapture spaces trackpad trackpadBluetooth ] '' # Set defaults echo >&2 "user defaults..." @@ -58,6 +59,7 @@ in ${concatStringsSep "\n" dock} ${concatStringsSep "\n" finder} ${concatStringsSep "\n" screencapture} + ${concatStringsSep "\n" spaces} ${concatStringsSep "\n" trackpad} ${concatStringsSep "\n" trackpadBluetooth} ''; diff --git a/modules/system/defaults/spaces.nix b/modules/system/defaults/spaces.nix new file mode 100644 index 0000000..89308a0 --- /dev/null +++ b/modules/system/defaults/spaces.nix @@ -0,0 +1,20 @@ +{ config, lib, ... }: + +with lib; + +{ + options = { + system.defaults.spaces.spans-displays = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Mission Control + Displays have separate Spaces (note a logout is required before + this setting will take affect). + + false = each physical display has a separate space (Mac default) + true = one space spans across all physical displays + ''; + }; + }; +} |
