/
default.nix
94 lines (84 loc) · 2.75 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
{ 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.allowedUsers = [ "brianhicks" "root" ];
nix.trustedUsers = [ "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.maxJobs = 20;
nix.buildCores = 20;
users.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";
};
};
# 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.xbar-pr-status pkgs.xbar-review-request-status pkgs.nix-tree ];
imports = [
../../dotfiles/alacritty
../../dotfiles/bat
../../dotfiles/cachix
../../dotfiles/comma
../../dotfiles/direnv
../../dotfiles/dog
../../dotfiles/fd
../../dotfiles/fzf
../../dotfiles/git
../../dotfiles/htop
../../dotfiles/lf
../../dotfiles/hammerspoon
../../dotfiles/home-manager
../../dotfiles/hyperfine
../../dotfiles/jq
../../dotfiles/kakoune
../../dotfiles/k9s
../../dotfiles/ncdu
../../dotfiles/niv
../../dotfiles/ripgrep
../../dotfiles/sd
../../dotfiles/ssh
../../dotfiles/tmux
../../dotfiles/tree
../../dotfiles/tree-grepper
../../dotfiles/watch
../../dotfiles/wezterm
../../dotfiles/zsh
];
};
};
}