1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

Merge pull request #71 from cmacrae/master

defaults: Add screencapture.location
This commit is contained in:
Daiderd Jordan 2018-03-01 21:19:48 +01:00 committed by GitHub
commit d00893d2fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View file

@ -28,6 +28,7 @@ let
./modules/system/defaults/NSGlobalDomain.nix
./modules/system/defaults/dock.nix
./modules/system/defaults/finder.nix
./modules/system/defaults/screencapture.nix
./modules/system/defaults/smb.nix
./modules/system/defaults/trackpad.nix
./modules/system/etc.nix

View file

@ -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}
'';

View file

@ -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.
'';
};
};
}