/
default.nix
131 lines (119 loc) · 3.33 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{ config
, pkgs
, ...
}: {
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
# allow zsh as a login shell
environment.shells = [ pkgs.zsh ];
programs.zsh.enable = true;
# nix.package = pkgs.nixUnstable;
nix.settings.allowed-users = [ "brianhicks" "root" ];
nix.settings.trusted-users = [ "brianhicks" "root" ];
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# You should generally set this to the total number of logical cores in your system.
# $ sysctl -n hw.ncpu
services.nix-daemon.enable = true;
nix.settings.max-jobs = 20;
nix.settings.cores = 20;
nix.configureBuildUsers = true;
# use nixbuild.net for distributed builds
nix.distributedBuilds = true;
nix.buildMachines = [
{
hostName = "eu.nixbuild.net";
system = "x86_64-linux";
maxJobs = 100;
supportedFeatures = [ "benchmark" "big-parallel" ];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
experimental-features = nix-command flakes
'';
programs.ssh.knownHosts = {
nixBuild = {
hostNames = [ "eu.nixbuild.net" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
};
};
homebrew = {
enable = true;
casks = [
"1password"
"1password/tap/1password-cli"
"alloy"
"anki"
"autodesk-fusion360"
"firefox"
"freecad"
"google-chrome"
"gpg-suite"
"hammerspoon"
"prusaslicer"
"shortcat"
"signal"
"slack"
"spotify"
"steam"
"wezterm"
"xbar"
"zoom"
"zulip"
];
};
# dotfiles
home-manager = {
useUserPackages = true;
users.brianhicks = { ... }: {
# nixpkgs inside the Darwin home-manager is different than the nixpkgs that
# gets sent down from the flake. Why? No clue. It's frustrating TBH; it
# doesn't work this way on Linux! Anyway, the workaround is simple enough:
# set the things we care about inside home-manager explicitly.
nixpkgs.config = pkgs.config;
nixpkgs.overlays = pkgs.overlays;
home.sessionVariables.NIX_PATH = "nixpkgs=${pkgs.path}:$NIX_PATH";
home.packages = [
pkgs.nix-tree
pkgs.pstree
pkgs.terminal-notifier
pkgs.xbar-pr-status
pkgs.xbar-review-request-status
];
imports = [
../../dotfiles/alacritty
../../dotfiles/bat
../../dotfiles/cachix
../../dotfiles/comma
../../dotfiles/direnv
../../dotfiles/dog
../../dotfiles/fd
../../dotfiles/fzf
../../dotfiles/git
../../dotfiles/hammerspoon
../../dotfiles/helix
../../dotfiles/home-manager
../../dotfiles/htop
../../dotfiles/hyperfine
../../dotfiles/jq
../../dotfiles/k9s
../../dotfiles/kakoune
../../dotfiles/lf
# ncdu currently does not compile!
# ../../dotfiles/ncdu
../../dotfiles/niv
../../dotfiles/ripgrep
../../dotfiles/sd
../../dotfiles/ssh
../../dotfiles/tmux
../../dotfiles/tree
../../dotfiles/tree-grepper
../../dotfiles/watch
../../dotfiles/wezterm
../../dotfiles/zsh
];
};
};
}