95 lines
2.2 KiB
Nix
95 lines
2.2 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ./nixpkgs.nix ]; # migrate this afterwards.
|
|
|
|
system.rebuild.enableNg = true;
|
|
|
|
sops.secrets."github/api" = {
|
|
mode = "0444";
|
|
group = "root";
|
|
};
|
|
|
|
nix = {
|
|
extraOptions = lib.mkDefault ''
|
|
builders-use-substitutes = true
|
|
!include ${config.sops.secrets."github/api".path}
|
|
'';
|
|
settings = {
|
|
trusted-users = [
|
|
"gunalx"
|
|
"root"
|
|
];
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
substituters = [
|
|
"https://cache.nixos.org/"
|
|
"https://cuda-maintainers.cachix.org"
|
|
"https://nix-community.cachix.org"
|
|
"https://nixos-rocm.cachix.org"
|
|
"https://nixpkgs-unfree.cachix.org"
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
|
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
|
|
];
|
|
};
|
|
|
|
buildMachines = [
|
|
{
|
|
hostName = "localhost";
|
|
system = "x86_64-linux";
|
|
maxJobs = 4;
|
|
speedFactor = 8000;
|
|
supportedFeatures = [ ];
|
|
mandatoryFeatures = [ ];
|
|
}
|
|
{
|
|
hostName = "aragon";
|
|
#system = "x86_64-linux";
|
|
# if the builder supports building for multiple architectures,
|
|
# replace the previous line by, e.g.,
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
maxJobs = 6;
|
|
speedFactor = 6001;
|
|
supportedFeatures = [ ];
|
|
mandatoryFeatures = [ ];
|
|
}
|
|
{
|
|
hostName = "galadriel";
|
|
system = "x86_64-linux";
|
|
maxJobs = 4;
|
|
speedFactor = 4001;
|
|
#supportedFeatures = [ "cuda" ];
|
|
supportedFeatures = [ ];
|
|
mandatoryFeatures = [ ];
|
|
}
|
|
|
|
];
|
|
distributedBuilds = true;
|
|
};
|
|
|
|
system.autoUpgrade = {
|
|
enable = true;
|
|
flake = "https://git.pvv.ntnu.no/adriangl/nix-dotfiles-v2.git";
|
|
flags = [
|
|
#"--no-write-lock-file"
|
|
"--print-build-logs" # -L
|
|
];
|
|
};
|
|
|
|
}
|