From 15d7ec30511199349c6cf8b6cbdc5e205a6a15e8 Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Wed, 21 Feb 2024 16:15:28 -0500 Subject: [PATCH] darwin: misc defaults (dock, menu clock, finder) --- .../darwin/user-defaults/opts-allhosts.nix | 100 +++++++++++++++++- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/modules/targets/darwin/user-defaults/opts-allhosts.nix b/modules/targets/darwin/user-defaults/opts-allhosts.nix index 820f05b3d..4a4f10671 100644 --- a/modules/targets/darwin/user-defaults/opts-allhosts.nix +++ b/modules/targets/darwin/user-defaults/opts-allhosts.nix @@ -41,6 +41,19 @@ in { description = "Sets the measurement unit."; }; + ApplePressAndHoldEnabled = mkNullableOption { + type = types.bool; + example = true; + description = + "Repeat a key when it is held down (false) or display the accented character selector (true)"; + }; + + AppleShowAllExtensions = mkNullableOption { + type = types.bool; + example = true; + description = "Always show file extensions in Finder"; + }; + AppleTemperatureUnit = mkNullableOption { type = types.enum [ "Celsius" "Fahrenheit" ]; example = "Celsius"; @@ -49,6 +62,16 @@ in { AppleMetricUnits = mkNullableEnableOption "the metric system"; + KeyRepeat = mkNullableOption { + type = types.int; + example = 2; + description = '' + Interval between key repetitions when holding down a key. Lower is + faster. When setting through the control panel, 2 is the lowest value, + and 120 the highest. + ''; + }; + NSAutomaticCapitalizationEnabled = mkNullableEnableOption "automatic capitalization"; @@ -85,14 +108,50 @@ in { }; "com.apple.dock" = { + autohide = mkNullableOption { + type = types.bool; + example = true; + description = "Hide the Dock automatically"; + }; + expose-group-apps = mkNullableEnableOption + "grouping of windows by application in Mission Control"; + orientation = mkNullableOption { + type = types.enum [ "left" "bottom" "right" ]; + example = "left"; + description = "Position of the Dock on the screen"; + }; + size-immutable = mkNullableEnableOption "locking of the dock size"; tilesize = mkNullableOption { type = types.int; example = 64; description = "Sets the size of the dock."; }; - size-immutable = mkNullableEnableOption "locking of the dock size"; - expose-group-apps = mkNullableEnableOption - "grouping of windows by application in Mission Control"; + }; + + "com.apple.finder" = { + AppleShowAllFiles = mkNullableOption { + type = types.bool; + example = true; + description = "Show hidden files in Finder"; + }; + + FXRemoveOldTrashItems = mkNullableOption { + type = types.bool; + example = true; + description = "Automatically delete items from trash after 30 days"; + }; + + ShowPathBar = mkNullableOption { + type = types.bool; + example = true; + description = "Show the path bar at the bottom of a Finder window"; + }; + + ShowStatusBar = mkNullableOption { + type = types.bool; + example = true; + description = "Show the status bar at the bottom of a Finder window"; + }; }; "com.apple.menuextra.battery".ShowPercent = mkNullableOption { @@ -106,6 +165,41 @@ in { ''; }; + "com.apple.menuextra.clock" = { + IsAnalog = mkNullableEnableOption + "showing an analog clock instead of a digital one"; + + Show24Hour = mkNullableEnableOption + "showing a 24-hour clock, instead of a 12-hour clock"; + + ShowAMPM = mkNullableOption { + type = types.bool; + description = '' + Show the AM/PM label. Useful if Show24Hour is false. Default is null. + ''; + }; + + ShowDate = mkNullableOption { + type = types.enum [ 0 1 2 ]; + description = '' + Show the full date. Default is null. + + 0 = Show the date + 1 = Don't show + 2 = Don't show + + TODO: I don't know what the difference is between 1 and 2. + ''; + }; + + ShowDayOfMonth = mkNullableEnableOption "showing the day of the month"; + + ShowDayOfWeek = mkNullableEnableOption "showing the day of the week"; + + ShowSeconds = mkNullableEnableOption + "showing the clock with second precision, instead of minutes"; + }; + "com.apple.Safari" = { AutoOpenSafeDownloads = mkNullableEnableOption "opening of downloaded files";