tangled
alpha
login
or
join now
tynanpurdy.com
/
nixconfig
1
fork
atom
I DO NOT KNOW WHAT IM DOING
1
fork
atom
overview
issues
pulls
pipelines
first flaking
tynanpurdy.com
1 month ago
1a8be55d
+132
1 changed file
expand all
collapse all
unified
split
flake.nix
+132
flake.nix
···
1
1
+
{
2
2
+
description = "Example nix-darwin system flake";
3
3
+
4
4
+
inputs = {
5
5
+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6
6
+
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
7
7
+
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
8
8
+
9
9
+
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
10
10
+
};
11
11
+
12
12
+
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew }:
13
13
+
let
14
14
+
configuration = { pkgs, ... }: {
15
15
+
system.primaryUser = "tynanpurdy";
16
16
+
security.pam.services.sudo_local.touchIdAuth = true;
17
17
+
# List packages installed in system profile. To search by name, run:
18
18
+
# $ nix-env -qaP | grep wget
19
19
+
environment.systemPackages =
20
20
+
[ pkgs.neovim
21
21
+
pkgs.tailscale-gui
22
22
+
pkgs.slack
23
23
+
pkgs.notion-app
24
24
+
pkgs.iterm2
25
25
+
pkgs.discord
26
26
+
pkgs.bitwarden-desktop
27
27
+
pkgs.raycast
28
28
+
pkgs.net-news-wire
29
29
+
pkgs.bitwarden-desktop
30
30
+
pkgs.zed-editor
31
31
+
pkgs.obsidian
32
32
+
];
33
33
+
34
34
+
environment.variables = {
35
35
+
GIT_AUTHOR_NAME = "Tynan Purdy";
36
36
+
GIT_AUTHOR_EMAIL = "did:plc:6ayddqghxhciedbaofoxkcbs";
37
37
+
};
38
38
+
39
39
+
system.keyboard = {
40
40
+
enableKeyMapping = true;
41
41
+
remapCapsLockToEscape = true;
42
42
+
};
43
43
+
44
44
+
system.defaults.CustomUserPreferences = {
45
45
+
"com.apple.symbolichotkeys" = {
46
46
+
AppleSymbolicHotKeys = {
47
47
+
# 64 is the Spolitght Search command ID
48
48
+
"64" = {
49
49
+
enabled = false;
50
50
+
value = {
51
51
+
parameters = [ 65535 49 1048576 ]; # cmd + space
52
52
+
type = "standard";
53
53
+
};
54
54
+
};
55
55
+
};
56
56
+
};
57
57
+
};
58
58
+
59
59
+
homebrew = {
60
60
+
enable = true;
61
61
+
onActivation.cleanup = "zap";
62
62
+
63
63
+
brews = [
64
64
+
];
65
65
+
66
66
+
casks = [
67
67
+
"markedit"
68
68
+
"netnewswire"
69
69
+
"qobuz"
70
70
+
"zen"
71
71
+
"stats"
72
72
+
"affinity"
73
73
+
"linearmouse"
74
74
+
];
75
75
+
76
76
+
masApps = {
77
77
+
"Fantastical" = 975937182;
78
78
+
"Aeronaut" = 6670275450;
79
79
+
};
80
80
+
};
81
81
+
82
82
+
environment.shellAliases = {
83
83
+
drs = "sudo darwin-rebuild switch --flake /etc/nix-darwin";
84
84
+
};
85
85
+
86
86
+
# Dock settings
87
87
+
system.defaults.dock = {
88
88
+
autohide = true;
89
89
+
show-recents = false;
90
90
+
};
91
91
+
system.defaults.dock.persistent-apps = [
92
92
+
"Applications/Zen.app"
93
93
+
"${pkgs.discord}/Applications/Discord.app"
94
94
+
"Applications/Fantastical.app"
95
95
+
];
96
96
+
97
97
+
# Necessary for using flakes on this system.
98
98
+
nix.settings.experimental-features = "nix-command flakes";
99
99
+
100
100
+
# Enable alternative shell support in nix-darwin.
101
101
+
# programs.fish.enable = true;
102
102
+
103
103
+
# Set Git commit hash for darwin-version.
104
104
+
system.configurationRevision = self.rev or self.dirtyRev or null;
105
105
+
106
106
+
# Used for backwards compatibility, please read the changelog before changing.
107
107
+
# $ darwin-rebuild changelog
108
108
+
system.stateVersion = 6;
109
109
+
110
110
+
# The platform the configuration will be used on.
111
111
+
nixpkgs.hostPlatform = "aarch64-darwin";
112
112
+
nixpkgs.config.allowUnfree = true;
113
113
+
};
114
114
+
in
115
115
+
{
116
116
+
# Build darwin flake using:
117
117
+
# $ darwin-rebuild build --flake .#MacBook-Air
118
118
+
darwinConfigurations."MacBook-Air" = nix-darwin.lib.darwinSystem {
119
119
+
modules = [
120
120
+
configuration
121
121
+
nix-homebrew.darwinModules.nix-homebrew
122
122
+
{
123
123
+
nix-homebrew = {
124
124
+
enable = true;
125
125
+
user = "tynanpurdy";
126
126
+
autoMigrate = true;
127
127
+
};
128
128
+
}
129
129
+
];
130
130
+
};
131
131
+
};
132
132
+
}