-
Notifications
You must be signed in to change notification settings - Fork 0
/
darwin.nix
98 lines (87 loc) · 2.23 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
95
96
97
98
{
self,
nix-darwin,
home-manager,
mac-app-util,
sops-nix,
...
}:
let
username = "adjsky";
homedir = "/Users/${username}";
configuration =
{ pkgs, ... }:
{
services.nix-daemon.enable = true;
nix.settings.experimental-features = "nix-command flakes";
nixpkgs = {
hostPlatform = "aarch64-darwin";
config = {
allowUnfree = true;
};
overlays = [
(import ./overlays)
];
};
system = {
configurationRevision = self.rev or self.dirtyRev or null;
stateVersion = 4;
};
system.defaults.finder = {
AppleShowAllExtensions = true;
AppleShowAllFiles = true;
FXPreferredViewStyle = "Nlsv";
_FXSortFoldersFirst = true;
};
system.defaults.CustomUserPreferences."com.apple.finder" = {
NewWindowTarget = "PfHm"; # new windows open in home dir
};
system.defaults.dock = {
persistent-apps = [
"${pkgs.zen-browser}/Applications/Zen Browser.app"
"${pkgs.vscode}/Applications/Visual Studio Code.app"
"${pkgs.wezterm}/Applications/WezTerm.app"
"${pkgs.slack}/Applications/Slack.app"
];
};
system.activationScripts.extraActivation.text = ''
softwareupdate --install-rosetta --agree-to-license
'';
users.users.${username} = {
name = username;
home = homedir;
};
security.pam.enableSudoTouchIdAuth = true;
fonts.packages = with pkgs; [
(nerdfonts.override {
fonts = [
"JetBrainsMono"
];
})
];
homebrew = {
enable = true;
masApps = {
Outline = 1356178125;
AmneziaWG = 6478942365;
};
};
};
in
nix-darwin.lib.darwinSystem {
modules = [
configuration
home-manager.darwinModules.home-manager
mac-app-util.darwinModules.default
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.verbose = true;
home-manager.users.${username} = import ./home;
home-manager.sharedModules = [
mac-app-util.homeManagerModules.default
sops-nix.homeManagerModules.sops
];
}
];
}