defaults: add com.apple.iCal for managing Calendar.app (#1446)
This commit is contained in:
commit
8817b00b00
5 changed files with 75 additions and 1 deletions
|
|
@ -23,6 +23,7 @@
|
|||
./system/defaults/dock.nix
|
||||
./system/defaults/finder.nix
|
||||
./system/defaults/hitoolbox.nix
|
||||
./system/defaults/iCal.nix
|
||||
./system/defaults/screencapture.nix
|
||||
./system/defaults/screensaver.nix
|
||||
./system/defaults/alf.nix
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ let
|
|||
dock = defaultsToList "com.apple.dock" dockFiltered;
|
||||
finder = defaultsToList "com.apple.finder" cfg.finder;
|
||||
hitoolbox = defaultsToList "com.apple.HIToolbox" cfg.hitoolbox;
|
||||
iCal = defaultsToList "com.apple.iCal" cfg.iCal;
|
||||
magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse;
|
||||
magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse;
|
||||
screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture;
|
||||
|
|
@ -37,7 +38,7 @@ let
|
|||
universalaccess = defaultsToList "com.apple.universalaccess" cfg.universalaccess;
|
||||
ActivityMonitor = defaultsToList "com.apple.ActivityMonitor" cfg.ActivityMonitor;
|
||||
WindowManager = defaultsToList "com.apple.WindowManager" cfg.WindowManager;
|
||||
controlcenter = defaultsToList "~/Library/Preferences/ByHost/com.apple.controlcenter" cfg.controlcenter;
|
||||
controlcenter = defaultsToList "~/Library/Preferences/ByHost/com.apple.controlcenter" cfg.controlcenter;
|
||||
CustomUserPreferences = flatten (mapAttrsToList (name: value: defaultsToList name value) cfg.CustomUserPreferences);
|
||||
CustomSystemPreferences = flatten (mapAttrsToList (name: value: defaultsToList name value) cfg.CustomSystemPreferences);
|
||||
|
||||
|
|
@ -83,6 +84,7 @@ in
|
|||
dock
|
||||
finder
|
||||
hitoolbox
|
||||
iCal
|
||||
magicmouse
|
||||
magicmouseBluetooth
|
||||
screencapture
|
||||
|
|
@ -108,6 +110,7 @@ in
|
|||
${concatStringsSep "\n" dock}
|
||||
${concatStringsSep "\n" finder}
|
||||
${concatStringsSep "\n" hitoolbox}
|
||||
${concatStringsSep "\n" iCal}
|
||||
${concatStringsSep "\n" magicmouse}
|
||||
${concatStringsSep "\n" magicmouseBluetooth}
|
||||
${concatStringsSep "\n" screencapture}
|
||||
|
|
|
|||
52
modules/system/defaults/iCal.nix
Normal file
52
modules/system/defaults/iCal.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
system.defaults.iCal."first day of week" = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.enum [
|
||||
"System Setting"
|
||||
"Sunday"
|
||||
"Monday"
|
||||
"Tuesday"
|
||||
"Wednesday"
|
||||
"Thursday"
|
||||
"Friday"
|
||||
"Saturday"
|
||||
]);
|
||||
apply = key: if key == null then null else {
|
||||
"System Setting" = 0;
|
||||
"Sunday" = 1;
|
||||
"Monday" = 2;
|
||||
"Tuesday" = 3;
|
||||
"Wednesday" = 4;
|
||||
"Thursday" = 5;
|
||||
"Friday" = 6;
|
||||
"Saturday" = 7;
|
||||
}.${key};
|
||||
default = null;
|
||||
description = ''
|
||||
Set the day to start week on in the Calendar. The default is "System Setting".
|
||||
|
||||
System Setting means inherit the value from Language & Region.
|
||||
'';
|
||||
};
|
||||
|
||||
system.defaults.iCal.CalendarSidebarShown = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
Show calendar list. The default is false.
|
||||
|
||||
This requires restarting `Calendar.app` to show.
|
||||
'';
|
||||
};
|
||||
|
||||
system.defaults.iCal."TimeZone support enabled" = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
Turn on time zone support. The default is false.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -458,6 +458,21 @@ defaults write com.apple.HIToolbox 'AppleFnUsageType' $'<?xml version="1.0" enco
|
|||
<plist version="1.0">
|
||||
<integer>2</integer>
|
||||
</plist>'
|
||||
defaults write com.apple.iCal 'CalendarSidebarShown' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<true/>
|
||||
</plist>'
|
||||
defaults write com.apple.iCal 'TimeZone support enabled' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<true/>
|
||||
</plist>'
|
||||
defaults write com.apple.iCal 'first day of week' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<integer>4</integer>
|
||||
</plist>'
|
||||
|
||||
|
||||
defaults write com.apple.screencapture 'include-date' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@
|
|||
system.defaults.finder.ShowMountedServersOnDesktop = false;
|
||||
system.defaults.finder.ShowRemovableMediaOnDesktop = false;
|
||||
system.defaults.hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
|
||||
system.defaults.iCal."first day of week" = "Wednesday";
|
||||
system.defaults.iCal.CalendarSidebarShown = true;
|
||||
system.defaults.iCal."TimeZone support enabled" = true;
|
||||
system.defaults.screencapture.location = "/tmp";
|
||||
system.defaults.screencapture.target = "file";
|
||||
system.defaults.screencapture.include-date = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue