-
Notifications
You must be signed in to change notification settings - Fork 34
/
bootstrap.nix
68 lines (53 loc) · 1.62 KB
/
bootstrap.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
{
lib,
pkgs,
...
}:
{
# Nix configuration -----------------------------------------------------------------------------
nix.settings = {
substituters = [
"https://cache.nixos.org/"
"https://malo.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"malo.cachix.org-1:fJL4+lpyMs/1cdZ23nPQXArGj8AS7x9U67O8rMkkMIo="
];
trusted-users = [ "@admin" ];
# https://github.com/NixOS/nix/issues/7273
auto-optimise-store = false;
experimental-features = [
"nix-command"
"flakes"
];
extra-platforms = lib.mkIf (pkgs.system == "aarch64-darwin") [
"x86_64-darwin"
"aarch64-darwin"
];
# Recommended when using `direnv` etc.
keep-derivations = true;
keep-outputs = true;
};
nix.configureBuildUsers = true;
# Don't need channels since I use flakes
nix.channel.enable = false;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Shells ----------------------------------------------------------------------------------------
# Add shells installed by nix to /etc/shells file
environment.shells = with pkgs; [
bashInteractive
fish
zsh
];
# Make Fish the default shell
programs.fish.enable = true;
programs.fish.useBabelfish = true;
environment.variables.SHELL = "${pkgs.fish}/bin/fish";
# Install and setup ZSH to work with nix(-darwin) as well
programs.zsh.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}