-
Notifications
You must be signed in to change notification settings - Fork 0
/
nix.nix
71 lines (68 loc) · 2.17 KB
/
nix.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
{ lib, pkgs, flake, ... }: {
nixpkgs.config = {
# TODO: required by `install-iso` image build for zfs-kernel
allowBroken = true;
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"1password"
"slack"
"steam"
"steam-original"
"steam-run"
"steam-unwrapped"
"vscode"
"vscode-extension-github-copilot"
"vscode-extension-github-copilot-chat"
"vscode-extension-ms-toolsai-jupyter"
"vscode-extension-ms-vscode-cpptools"
"vscode-extension-ms-vsliveshare-vsliveshare"
"vscode-extension-ms-vscode-remote-remote-containers"
"onepassword-password-manager"
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
];
permittedInsecurePackages = [
"electron-27.3.11"
];
};
nix = {
package = pkgs.nixVersions.latest;
gc = {
automatic = false;
options = "--delete-older-than 30d";
};
extraOptions = ''
# https://github.com/nix-community/nix-direnv#installation
keep-outputs = true
keep-derivations = true
# useful when builder has faster network
builders-use-substitutes = true
'';
settings = {
experimental-features = "nix-command flakes";
trusted-users = [ "root" flake.lib.username ];
trusted-public-keys = [
"hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-substituters = [
"https://cache.nixos.org"
"https://hydra.nixos.org"
"https://nix-community.cachix.org"
];
};
distributedBuilds = true;
buildMachines = with flake.nixosConfigurations.server.config; [{
hostName = networking.hostName;
# TODO: base64 encode
# publicHostKey = age.rekey.hostPubkey;
sshUser = flake.lib.username;
# TODO: sshKey = config.age.secrets.id_ed25519.path;
sshKey = "/home/${flake.lib.username}/.ssh/id_ed25519";
# TODO: dynamically generate based on fs heirarchy
systems = [ "x86_64-linux" ];
maxJobs = 8;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}];
};
}