summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2022-12-16 13:06:46 +0000
committerGitHub <noreply@github.com>2022-12-16 13:06:46 +0000
commit7e7498acfe3e20705f10dbf676cdd256bb8df03c (patch)
tree3a968c1d0743c885718d606b1a53f4b3f6a9b2e8
parent2795e05cca69bddad989186888175548f4fca33d (diff)
parent6774344719a51d2bfb3a9132d3faec2d86a66286 (diff)
Merge pull request #580 from sliminality/add-24h-time
Add option to use 24-hour system time
-rw-r--r--modules/system/defaults/NSGlobalDomain.nix8
-rw-r--r--tests/system-defaults-write.nix2
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/system/defaults/NSGlobalDomain.nix b/modules/system/defaults/NSGlobalDomain.nix
index 49a2a86..0224b70 100644
--- a/modules/system/defaults/NSGlobalDomain.nix
+++ b/modules/system/defaults/NSGlobalDomain.nix
@@ -363,6 +363,14 @@ in {
'';
};
+ system.defaults.NSGlobalDomain.AppleICUForce24HourTime = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Whether to use 24-hour or 12-hour time. The default is based on region settings.
+ '';
+ };
+
system.defaults.NSGlobalDomain._HIHideMenuBar = mkOption {
type = types.nullOr types.bool;
default = null;
diff --git a/tests/system-defaults-write.nix b/tests/system-defaults-write.nix
index 3aaa05c..344c440 100644
--- a/tests/system-defaults-write.nix
+++ b/tests/system-defaults-write.nix
@@ -5,6 +5,7 @@
system.defaults.NSGlobalDomain.AppleEnableMouseSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleEnableSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleFontSmoothing = 1;
+ system.defaults.NSGlobalDomain.AppleICUForce24HourTime = true;
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = true;
system.defaults.NSGlobalDomain.AppleShowAllExtensions = true;
@@ -67,6 +68,7 @@
grep "defaults write -g 'AppleEnableMouseSwipeNavigateWithScrolls' -bool NO" ${config.out}/activate-user
grep "defaults write -g 'AppleEnableSwipeNavigateWithScrolls' -bool NO" ${config.out}/activate-user
grep "defaults write -g 'AppleFontSmoothing' -int 1" ${config.out}/activate-user
+ grep "defaults write -g 'AppleICUForce24HourTime' -bool YES" ${config.out}/activate-user
grep "defaults write -g 'AppleKeyboardUIMode' -int 3" ${config.out}/activate-user
grep "defaults write -g 'ApplePressAndHoldEnabled' -bool YES" ${config.out}/activate-user
grep "defaults write -g 'AppleShowAllExtensions' -bool YES" ${config.out}/activate-user