-
Notifications
You must be signed in to change notification settings - Fork 0
/
darwin.nix
94 lines (82 loc) · 2.12 KB
/
darwin.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
{ inputs, config, pkgs, ... }:
let
emacs = (pkgs.emacsWithPackagesFromUsePackage {
config = ./emacs.el;
defaultInitFile = true;
package = pkgs.emacs30;
alwaysEnsure = true;
extraEmacsPackages = epkgs: [
epkgs.treesit-grammars.with-all-grammars
];
});
in {
environment.systemPackages = [
# emacs
];
# fonts.packages = [ pkgs.monaspace ];
homebrew = {
enable = true;
onActivation = {
autoUpdate = false;
cleanup = "zap";
upgrade = true;
};
brews = [
"openconnect"
];
casks = [
"1password"
"1password-cli"
"scroll-reverser"
];
global = {
autoUpdate = false;
};
};
services = {
emacs = {
enable = true;
package = emacs;
additionalPath = [ "/etc/profiles/per-user/dpontoriero/bin" ];
};
# Auto upgrade nix package and the daemon service.
nix-daemon.enable = true;
};
# nix.package = pkgs.nix;
nix.optimise.automatic = true;
nix.settings.trusted-users = [ "root" "%admin" ];
nixpkgs = {
config = {
allowUnfree = true;
};
overlays = [
inputs.emacs-overlay.overlays.package
inputs.emacs-darwin.overlays.emacs
];
};
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true;
# Set Git commit hash for darwin-version.
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
system.defaults = {
dock = {
autohide = true;
show-recents = false;
};
finder = {
AppleShowAllExtensions = true;
ShowPathbar = true;
FXEnableExtensionChangeWarning = false;
};
menuExtraClock.Show24Hour = true;
};
security.pam.enableSudoTouchIdAuth = true;
}