{ config, pkgs, lib, ... }: { imports = [ ]; system.rebuild.enableNg = true; nixpkgs.config.allowUnfree = true; nixpkgs.config.permittedInsecurePackages = [ # example "python3.11-youtube-dl-2021.12.17" ]; 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" ]; mandatoryFeatures = [ ]; } { hostName = "bolle.pbsds.net"; system = "x86_64-linux"; maxJobs = 6; speedFactor = 6000; } { hostName = "garp.pbsds.net"; system = "x86_64-linux"; maxJobs = 4; # i7-6700 speedFactor = 4000; } ]; 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 ]; }; }