-
Notifications
You must be signed in to change notification settings - Fork 0
/
system.nix
125 lines (105 loc) · 4.15 KB
/
system.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{ pkgs, ... }:
###################################################################################
#
# macOS's System configuration
#
# All the configuration options are documented here:
# https://daiderd.com/nix-darwin/manual/index.html#sec-options
#
###################################################################################
{
# power = {
# sleep = {
# display = "never"; # Never turn off the display
# computer = "never"; # Never put the computer to sleep
# };
# };
system = {
stateVersion = 5;
# activationScripts are executed every time you boot the system or run `nixos-rebuild` / `darwin-rebuild`.
activationScripts.postUserActivation.text = ''
# activateSettings -u will reload the settings from the database and apply them to the current session,
# so we do not need to logout and login again to make the changes take effect.
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
'';
defaults = {
menuExtraClock.Show24Hour = true; # Show 24 hour clock
NSGlobalDomain = {
AppleInterfaceStyle = "Dark"; # Set dark mode
ApplePressAndHoldEnabled = false; # Disable accented characters
InitialKeyRepeat = 15; # Set initial key repeat delay
KeyRepeat = 3; # Set key repeat rate
AppleShowScrollBars = "Always"; # Always show scrollbars
};
finder = {
NewWindowTarget = "Home"; # Open new Finder windows in Computer
AppleShowAllExtensions = true; # Show all file extensions
AppleShowAllFiles = true; # Show hidden files by default
ShowStatusBar = true; # Show status bar
ShowPathbar = true; # Show path bar
_FXShowPosixPathInTitle = true; # Show full path in Finder title
_FXSortFoldersFirst = true; # Sort folders first
FXDefaultSearchScope = "SCcf"; # Search the current folder by default
FXEnableExtensionChangeWarning = false; # Disable extension change warning
FXPreferredViewStyle = "Nlsv"; # Set default view to list
};
dock = {
tilesize = 64; # Set the dock tile size
# Set the dock to autohide and remove the delay
launchanim = false;
autohide-delay = 0.0;
autohide-time-modifier = 0.0;
autohide = true;
mru-spaces = false; # Disable most recent spaces
showhidden = true; # Show hidden apps in the dock
show-recents = false; # Remove recent apps from the dock
# Hot corners
wvous-tr-corner = 13; # top right corner
wvous-tl-corner = 1; # top left corner
wvous-br-corner = 1; # bottom right corner
wvous-bl-corner = 1; # bottom left corner
persistent-apps = [
"/System/Applications/System Settings.app"
"/Applications/Firefox.app"
"/Applications/kitty.app"
];
persistent-others = null;
};
trackpad = {
Clicking = true; # Enable tap to click
TrackpadRightClick = true; # Enable right click
};
ActivityMonitor = {
ShowCategory = 100; # Show all processes
SortColumn = "CPUUsage"; # Sort by CPU usage
SortDirection = 0; # Sort in descending order
};
screensaver = {
askForPassword = true; # Ask for password immediately after sleep or screen saver begins
askForPasswordDelay = 0; # Set the delay to 0
};
WindowManager = {
EnableStandardClickToShowDesktop = false; # Disable click on the wallpaper to show desktop
StandardHideDesktopIcons = true; # Hide desktop icons
};
};
};
# Add ability to used TouchID for sudo authentication
security.pam.enableSudoTouchIdAuth = true;
# Create /etc/zshrc that loads the nix-darwin environment.
# this is required if you want to use darwin's default shell - zsh
programs.zsh.enable = true;
fonts = {
packages = with pkgs; [
jetbrains-mono
# nerdfonts
# https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/data/fonts/nerdfonts/shas.nix
(nerdfonts.override {
fonts = [
# symbols icon only
"NerdFontsSymbolsOnly"
];
})
];
};
}