diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-03-01 21:19:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-01 21:19:48 +0100 |
| commit | d00893d2fac5702d53e466bee8761e49a3dee280 (patch) | |
| tree | 4f7b957598b912e5b3d660448b221c83a274e93c /modules | |
| parent | 42fb777813b5421974f2f66f99bf7aba1bbe7c25 (diff) | |
| parent | 9a1499b12899157a2fb8b0e3394d96e8fff5e954 (diff) | |
Merge pull request #71 from cmacrae/master
defaults: Add screencapture.location
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/system/defaults-write.nix | 4 | ||||
| -rw-r--r-- | modules/system/defaults/screencapture.nix | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix index e1ec96c..80ffb08 100644 --- a/modules/system/defaults-write.nix +++ b/modules/system/defaults-write.nix @@ -26,6 +26,7 @@ let dock = defaultsToList "com.apple.dock" cfg.dock; finder = defaultsToList "com.apple.finder" cfg.finder; smb = defaultsToList "/Library/Preferences/SystemConfiguration/com.apple.smb.server" cfg.smb; + screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture; trackpad = defaultsToList "com.apple.AppleMultitouchTrackpad" cfg.trackpad; trackpadBluetooth = defaultsToList "com.apple.driver.AppleBluetoothMultitouch.trackpad" cfg.trackpad; @@ -43,7 +44,7 @@ in ''; system.activationScripts.userDefaults.text = mkIfAttrs - [ NSGlobalDomain LaunchServices dock finder trackpad trackpadBluetooth ] + [ NSGlobalDomain LaunchServices dock finder screencapture trackpad trackpadBluetooth ] '' # Set defaults echo >&2 "user defaults..." @@ -52,6 +53,7 @@ in ${concatStringsSep "\n" LaunchServices} ${concatStringsSep "\n" dock} ${concatStringsSep "\n" finder} + ${concatStringsSep "\n" screencapture} ${concatStringsSep "\n" trackpad} ${concatStringsSep "\n" trackpadBluetooth} ''; diff --git a/modules/system/defaults/screencapture.nix b/modules/system/defaults/screencapture.nix new file mode 100644 index 0000000..a101c00 --- /dev/null +++ b/modules/system/defaults/screencapture.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +with lib; + +{ + options = { + + system.defaults.screencapture.location = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + The filesystem path to which screencaptures should be written. + ''; + }; + }; +} |
