summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-01-05 18:36:13 +0100
committerGitHub <noreply@github.com>2018-01-05 18:36:13 +0100
commit52cf461055331dffe0acb878cfc7e570a220342d (patch)
tree4751bbb0674ee49ab8bcb590d9dbfdb938c0ce2b /modules/system
parent7eb4e21075843a85ce9d31bbcaefe23d688e8f7d (diff)
parent01692f870b50cab498eeb73c88449d1d24e799af (diff)
Merge pull request #62 from pjan/enh/NSGlobalDomain
Adds more NSGlobalDomain options + tests
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/defaults/NSGlobalDomain.nix167
1 files changed, 142 insertions, 25 deletions
diff --git a/modules/system/defaults/NSGlobalDomain.nix b/modules/system/defaults/NSGlobalDomain.nix
index f5c0a5c..984adf6 100644
--- a/modules/system/defaults/NSGlobalDomain.nix
+++ b/modules/system/defaults/NSGlobalDomain.nix
@@ -2,9 +2,27 @@
with lib;
-{
+let
+ isFloat = x: isString x && builtins.match "^[+-]?([0-9]*[.])?[0-9]+$" x != null;
+
+ float = mkOptionType {
+ name = "float";
+ description = "float";
+ check = isFloat;
+ merge = options.mergeOneOption;
+ };
+
+in {
options = {
+ system.defaults.NSGlobalDomain.AppleFontSmoothing = mkOption {
+ type = types.nullOr (types.enum [ 0 1 2 ]);
+ default = null;
+ description = ''
+ Sets the level of font smoothing (sub-pixel font rendering).
+ '';
+ };
+
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = mkOption {
type = types.nullOr (types.enum [ 3 ]);
default = null;
@@ -21,27 +39,19 @@ with lib;
'';
};
- system.defaults.NSGlobalDomain.InitialKeyRepeat = mkOption {
- type = types.nullOr types.int;
+ system.defaults.NSGlobalDomain.AppleShowAllExtensions = mkOption {
+ type = types.nullOr types.bool;
default = null;
description = ''
- # Apple menu > System Preferences > Keyboard
- If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat.
- For example, the Delete key continues to remove text for as long as you hold it down.
-
- This sets how long you must hold down the key before it starts repeating.
+ Whether to show all file extensions in finder. The default is false.
'';
};
- system.defaults.NSGlobalDomain.KeyRepeat = mkOption {
- type = types.nullOr types.int;
+ system.defaults.NSGlobalDomain.AppleShowScrollBars = mkOption {
+ type = types.nullOr (types.enum [ "WhenScrolling" "Automatic" "Always" ]);
default = null;
description = ''
- # Apple menu > System Preferences > Keyboard
- If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat.
- For example, the Delete key continues to remove text for as long as you hold it down.
-
- This sets how fast it repeats once it starts.
+ When to show the scrollbars. Options are 'WhenScrolling', 'Automatic' and 'Always'.
'';
};
@@ -53,27 +63,27 @@ with lib;
'';
};
- system.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled = mkOption {
+ system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
- Whether to enable smart quote substitution. The default is true.
+ Whether to enable smart dash substitution. The default is true.
'';
};
- system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = mkOption {
+ system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
- Whether to enable smart dash substitution. The default is true.
+ Whether to enable smart period substitution. The default is true.
'';
};
- system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = mkOption {
+ system.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
- Whether to enable smart period substitution. The default is true.
+ Whether to enable smart quote substitution. The default is true.
'';
};
@@ -85,6 +95,14 @@ with lib;
'';
};
+ system.defaults.NSGlobalDomain.NSDisableAutomaticTermination = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to disable the automatic termination of inactive apps.
+ '';
+ };
+
system.defaults.NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = mkOption {
type = types.nullOr types.bool;
default = null;
@@ -109,19 +127,84 @@ with lib;
'';
};
- system.defaults.NSGlobalDomain."com.apple.trackpad.enableSecondaryClick" = mkOption {
+ system.defaults.NSGlobalDomain.NSTableViewDefaultSizeMode = mkOption {
+ type = types.nullOr (types.enum [ 1 2 3 ]);
+ default = null;
+ description = ''
+ Sets the size of the finder sidebar icons: 1 (small), 2 (medium) or 3 (large). The default is 3.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.NSTextShowsControlCharacters = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
- Whether to enable trackpad secondary click. The default is true.
+ Whether to display ASCII control characters using caret notation in standard text views. The default is false.
'';
};
- system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = mkOption {
+ system.defaults.NSGlobalDomain.NSUseAnimatedFocusRing = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
- Whether to enable "Natural" scrolling direction. The default is true.
+ Whether to enable the focus ring animation. The default is true.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.NSScrollAnimationEnabled = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to enable smooth scrolling. The default is true.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.NSWindowResizeTime = mkOption {
+ type = types.nullOr float;
+ default = null;
+ example = "0.20";
+ description = ''
+ Sets the speed speed of window resizing. The default is given in the example.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.InitialKeyRepeat = mkOption {
+ type = types.nullOr types.int;
+ default = null;
+ description = ''
+ # Apple menu > System Preferences > Keyboard
+ If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat.
+ For example, the Delete key continues to remove text for as long as you hold it down.
+
+ This sets how long you must hold down the key before it starts repeating.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.KeyRepeat = mkOption {
+ type = types.nullOr types.int;
+ default = null;
+ description = ''
+ # Apple menu > System Preferences > Keyboard
+ If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat.
+ For example, the Delete key continues to remove text for as long as you hold it down.
+
+ This sets how fast it repeats once it starts.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.PMPrintingExpandedStateForPrint = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to use the expanded print panel by default. The default is false.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain.PMPrintingExpandedStateForPrint2 = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to use the expanded print panel by default. The default is false.
'';
};
@@ -133,6 +216,14 @@ with lib;
'';
};
+ system.defaults.NSGlobalDomain."com.apple.trackpad.enableSecondaryClick" = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to enable trackpad secondary click. The default is true.
+ '';
+ };
+
system.defaults.NSGlobalDomain."com.apple.trackpad.trackpadCornerClickBehavior" = mkOption {
type = types.nullOr (types.enum [ 1 ]);
default = null;
@@ -141,5 +232,31 @@ with lib;
'';
};
+ system.defaults.NSGlobalDomain."com.apple.springing.enabled" = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to enable spring loading (expose) for directories.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain."com.apple.springing.delay" = mkOption {
+ type = types.nullOr float;
+ default = null;
+ example = "1.0";
+ description = ''
+ Set the spring loading delay for directories. The default is given in the example.
+ '';
+ };
+
+ system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to enable "Natural" scrolling direction. The default is true.
+ '';
+ };
+
};
+
}