Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Center: Add missing Options, and Fix some #1347

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
./system/applications.nix
./system/defaults-write.nix
./system/defaults/controlcenter.nix
./system/defaults/Spotlight.nix
./system/defaults/LaunchServices.nix
./system/defaults/NSGlobalDomain.nix
./system/defaults/GlobalPreferences.nix
Expand Down
3 changes: 3 additions & 0 deletions modules/system/defaults-write.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let
ActivityMonitor = defaultsToList "com.apple.ActivityMonitor" cfg.ActivityMonitor;
WindowManager = defaultsToList "com.apple.WindowManager" cfg.WindowManager;
controlcenter = defaultsToList "~/Library/Preferences/ByHost/com.apple.controlcenter" cfg.controlcenter;
Spotlight = defaultsToList "~/Library/Preferences/ByHost/com.apple.Spotlight" cfg.Spotlight;
CustomUserPreferences = flatten (mapAttrsToList (name: value: defaultsToList name value) cfg.CustomUserPreferences);
CustomSystemPreferences = flatten (mapAttrsToList (name: value: defaultsToList name value) cfg.CustomSystemPreferences);

Expand Down Expand Up @@ -95,6 +96,7 @@ in
CustomUserPreferences
WindowManager
controlcenter
Spotlight
]
''
# Set defaults
Expand All @@ -120,6 +122,7 @@ in
${concatStringsSep "\n" CustomUserPreferences}
${concatStringsSep "\n" WindowManager}
${concatStringsSep "\n" controlcenter}
${concatStringsSep "\n" Spotlight}

${optionalString (length dock > 0) ''
# Only restart Dock if current user is logged in
Expand Down
20 changes: 20 additions & 0 deletions modules/system/defaults/Spotlight.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ config, lib, ... }:

{
options = {
system.defaults.Spotlight.MenuItemHidden = lib.mkOption {
type = lib.types.nullOr lib.types.bool;
default = null;
description = ''
Show Spotlight control in menu bar.

Available settings:
true - Don't Show in Menu Bar
false - Show in Menu Bar

This option mirrors the setting found in:
System Preferences > Control Center > Menu Bar Only > Spotlight
'';
};
};
}
Loading
Loading