-
Notifications
You must be signed in to change notification settings - Fork 105
/
default.nix
106 lines (86 loc) · 2.77 KB
/
default.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
{ agenix, config, pkgs, ... }:
let user = "dustin"; in
{
imports = [
../../modules/darwin/secrets.nix
../../modules/darwin/home-manager.nix
../../modules/shared
../../modules/shared/cachix
agenix.darwinModules.default
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Setup user, packages, programs
nix = {
package = pkgs.nixUnstable;
settings.trusted-users = [ "@admin" "${user}" ];
gc = {
user = "root";
automatic = true;
interval = { Weekday = 0; Hour = 2; Minute = 0; };
options = "--delete-older-than 30d";
};
# Turn this on to make command line easier
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# Turn off NIX_PATH warnings now that we're using flakes
system.checks.verifyNixPath = false;
# Load configuration that is shared across systems
environment.systemPackages = with pkgs; [
emacs-unstable
agenix.packages."${pkgs.system}".default
] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
# Enable fonts dir
fonts.fontDir.enable = true;
launchd.user.agents.emacs.path = [ config.environment.systemPath ];
launchd.user.agents.emacs.serviceConfig = {
KeepAlive = true;
ProgramArguments = [
"/bin/sh"
"-c"
"{ osascript -e 'display notification \"Attempting to start Emacs...\" with title \"Emacs Launch\"'; /bin/wait4path ${pkgs.emacs}/bin/emacs && { ${pkgs.emacs}/bin/emacs --fg-daemon; if [ $? -eq 0 ]; then osascript -e 'display notification \"Emacs has started.\" with title \"Emacs Launch\"'; else osascript -e 'display notification \"Failed to start Emacs.\" with title \"Emacs Launch\"' >&2; fi; } } &> /tmp/emacs_launch.log"
];
StandardErrorPath = "/tmp/emacs.err.log";
StandardOutPath = "/tmp/emacs.out.log";
};
system = {
stateVersion = 4;
defaults = {
LaunchServices = {
LSQuarantine = false;
};
NSGlobalDomain = {
AppleShowAllExtensions = true;
ApplePressAndHoldEnabled = false;
# 120, 90, 60, 30, 12, 6, 2
KeyRepeat = 2;
# 120, 94, 68, 35, 25, 15
InitialKeyRepeat = 15;
"com.apple.mouse.tapBehavior" = 1;
"com.apple.sound.beep.volume" = 0.0;
"com.apple.sound.beep.feedback" = 0;
};
dock = {
autohide = false;
show-recents = false;
launchanim = true;
mouse-over-hilite-stack = true;
orientation = "bottom";
tilesize = 48;
};
finder = {
_FXShowPosixPathInTitle = false;
};
trackpad = {
Clicking = true;
TrackpadThreeFingerDrag = true;
};
};
keyboard = {
enableKeyMapping = true;
remapCapsLockToControl = true;
};
};
}