Skip to content

Commit eb0d2fb

Browse files
committed
chore(user/refnode): enable macOS defaults using nix-darwin
1 parent 0214577 commit eb0d2fb

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed

users/refnode/common/darwin/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
...
66
}: {
77
imports = [
8+
./systemdefaults.nix
89
./aerospace.nix
910
./service-keepassxc.nix
1011
];
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
...
6+
}: {
7+
system.defaults = {
8+
LaunchServices = {
9+
# Whether to enable quarantine for downloaded applications.
10+
# The default is true.
11+
LSQuarantine = true;
12+
};
13+
14+
SoftwareUpdate = {
15+
# Automatically install Mac OS software updates.
16+
# Defaults to false.
17+
AutomaticallyInstallMacOSUpdates = false;
18+
};
19+
20+
NSGlobalDomain = {
21+
# Whether to enable automatic capitalization.
22+
# The default is true.
23+
NSAutomaticCapitalizationEnabled = false;
24+
# Whether to enable smart dash substitution.
25+
# The default is true.
26+
NSAutomaticDashSubstitutionEnabled = true;
27+
# Whether to enable automatic spelling correction.
28+
# The default is true.
29+
NSAutomaticSpellingCorrectionEnabled = false;
30+
# Whether to use expanded save panel by default.
31+
# The default is false.
32+
NSNavPanelExpandedStateForSaveMode = true;
33+
# Whether to use expanded save panel by default.
34+
# The default is false.
35+
NSNavPanelExpandedStateForSaveMode2 = true;
36+
# Sets the beep/alert volume level
37+
# from 0.000 (muted) to 1.000 (100% volume).
38+
"com.apple.sound.beep.volume" = 0.000;
39+
};
40+
41+
controlcenter = {
42+
AirDrop = false;
43+
BatteryShowPercentage = false;
44+
Bluetooth = false;
45+
Display = false;
46+
FocusModes = true;
47+
NowPlaying = false;
48+
Sound = true;
49+
};
50+
51+
dock = {
52+
# Whether to automatically rearrange spaces based on most
53+
# recent use. The default is true.
54+
mru-spaces = false;
55+
# Position of the dock on screen. The default is “bottom”.
56+
orientation = "left";
57+
# Show recent applications in the dock. The default is true.
58+
show-recents = false;
59+
# Size of the icons in the dock. The default is 64.
60+
tilesize = 32;
61+
# Hot corner action for bottom left corner. Disable it.
62+
wvous-bl-corner = 1;
63+
# Hot corner action for bottom right corner. Disable it.
64+
wvous-br-corner = 1;
65+
# Hot corner action for top left corner. Disable it.
66+
wvous-tl-corner = 1;
67+
# Hot corner action for top right corner. Disable it.
68+
wvous-tr-corner = 1;
69+
};
70+
71+
finder = {
72+
# Whether to always show file extensions.
73+
# The default is false.
74+
AppleShowAllExtensions = true;
75+
# Whether to always show hidden files.
76+
# The default is false.
77+
AppleShowAllFiles = false;
78+
# Whether to show icons on the desktop or not.
79+
# The default is true.
80+
CreateDesktop = false;
81+
# Change the default search scope.
82+
# Use “SCcf” to default to current folder.
83+
# The default is unset (“This Mac”).
84+
FXDefaultSearchScope = null;
85+
# Whether to show warnings when change the file extension of files.
86+
# The default is true.
87+
FXEnableExtensionChangeWarning = true;
88+
# Change the default finder view.
89+
# “icnv” = Icon view, “Nlsv” = List view,
90+
# “clmv” = Column View, “Flwv” = Gallery View
91+
# The default is icnv.
92+
FXPreferredViewStyle = "clmv";
93+
# Remove items in the trash after 30 days.
94+
# The default is false.
95+
FXRemoveOldTrashItems = false;
96+
NewWindowTarget = "Home";
97+
# Only when NewWindowTarget = Other
98+
# NewWindowTargetPath
99+
# Whether to allow quitting of the Finder.
100+
# The default is false.
101+
QuitMenuItem = true;
102+
# Whether to show external disks on desktop.
103+
# The default is true.
104+
ShowExternalHardDrivesOnDesktop = false;
105+
# Whether to show hard disks on desktop.
106+
# The default is false.
107+
ShowHardDrivesOnDesktop = false;
108+
# Whether to show connected servers on desktop.
109+
# The default is false.
110+
ShowMountedServersOnDesktop = false;
111+
# Show path breadcrumbs in finder windows.
112+
# The default is false.
113+
ShowPathbar = true;
114+
# Whether to show removable media (CDs, DVDs and iPods)
115+
# on desktop. The default is true.
116+
ShowRemovableMediaOnDesktop = false;
117+
# Show status bar at bottom of finder windows with item/disk
118+
# space stats. The default is false.
119+
ShowStatusBar = true;
120+
# Whether to show the full POSIX filepath in the window title.
121+
# The default is false.
122+
_FXShowPosixPathInTitle = true;
123+
# Keep folders on top when sorting by name.
124+
# The default is false.
125+
_FXSortFoldersFirst = true;
126+
# Keep folders on top when sorting by name on the desktop.
127+
# The default is false.
128+
# Not really required, because icon view on desktop is disabled.
129+
_FXSortFoldersFirstOnDesktop = true;
130+
};
131+
132+
# capture screenshots in png format to `location` with
133+
# isodate in the filename
134+
screencapture = {
135+
disable-shadow = true;
136+
include-date = true;
137+
location = "~/Documents/Screenshots";
138+
show-thumbnail = true;
139+
target = "file";
140+
type = "png";
141+
};
142+
143+
# ask for the password to unblock screen when screensaver
144+
# becomes active
145+
screensaver = {
146+
askForPassword = true;
147+
askForPasswordDelay = 0;
148+
};
149+
};
150+
}

0 commit comments

Comments
 (0)