2022-12-14 23:46:25 +03:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
2022-02-11 19:40:34 +03:00
|
|
|
with config.deviceSpecific; {
|
2021-02-07 02:38:11 +03:00
|
|
|
nix = rec {
|
2021-06-16 05:30:04 +03:00
|
|
|
nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ];
|
2021-02-07 02:38:11 +03:00
|
|
|
|
|
|
|
registry.self.flake = inputs.self;
|
2022-03-10 19:11:45 +03:00
|
|
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
2021-02-07 02:38:11 +03:00
|
|
|
|
2023-04-08 18:17:45 +03:00
|
|
|
optimise.automatic = lib.mkDefault true;
|
2021-02-07 02:38:11 +03:00
|
|
|
|
|
|
|
extraOptions = ''
|
2022-08-31 11:37:26 +03:00
|
|
|
builders-use-substitutes = true
|
2022-12-07 22:05:00 +03:00
|
|
|
experimental-features = nix-command flakes
|
2023-04-25 17:45:26 +03:00
|
|
|
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
|
2022-12-07 22:05:00 +03:00
|
|
|
# Prevent Nix from fetching the registry every time
|
|
|
|
flake-registry = ${inputs.flake-registry}/flake-registry.json
|
2021-02-07 02:38:11 +03:00
|
|
|
'';
|
|
|
|
|
2022-03-10 19:11:45 +03:00
|
|
|
settings = {
|
|
|
|
auto-optimise-store = false;
|
|
|
|
require-sigs = true;
|
|
|
|
substituters = [
|
|
|
|
"https://cache.nixos.org"
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
"https://nixpkgs-wayland.cachix.org"
|
2022-08-05 21:10:22 +03:00
|
|
|
"https://hyprland.cachix.org"
|
2023-02-14 07:04:20 +03:00
|
|
|
"https://ataraxiadev-foss.cachix.org"
|
2023-06-14 00:27:12 +03:00
|
|
|
"https://cache.ataraxiadev.com/ataraxiadev"
|
2023-06-15 22:06:44 +03:00
|
|
|
"https://numtide.cachix.org"
|
2022-03-10 19:11:45 +03:00
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
2022-08-05 21:10:22 +03:00
|
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
2023-02-14 07:04:20 +03:00
|
|
|
"ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058="
|
2023-06-20 13:32:53 +03:00
|
|
|
"ataraxiadev:/V5bNjSzHVGx6r2XA2fjkgUYgqoz9VnrAHq45+2FJAs="
|
2023-06-15 22:06:44 +03:00
|
|
|
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
|
2022-03-10 19:11:45 +03:00
|
|
|
];
|
2023-06-27 23:07:48 +03:00
|
|
|
trusted-users = [ "root" config.mainuser "deploy" "@wheel" ];
|
2023-03-27 15:50:40 +03:00
|
|
|
use-xdg-base-directories = true;
|
2022-03-10 19:11:45 +03:00
|
|
|
};
|
2022-08-18 17:42:27 +03:00
|
|
|
|
|
|
|
buildMachines = [
|
|
|
|
{
|
|
|
|
hostName = "nix-builder";
|
|
|
|
maxJobs = 8;
|
2023-03-25 19:30:34 +03:00
|
|
|
sshUser = "ataraxia";
|
2022-08-18 17:42:27 +03:00
|
|
|
sshKey = config.secrets.ssh-builder.decrypted;
|
2023-03-27 20:57:06 +03:00
|
|
|
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
2022-08-31 11:37:26 +03:00
|
|
|
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
2022-08-18 17:42:27 +03:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
distributedBuilds = lib.mkIf (config.device != "AMD-Workstation") true;
|
2021-02-07 02:38:11 +03:00
|
|
|
};
|
|
|
|
|
2022-03-10 19:11:45 +03:00
|
|
|
environment.etc.nixpkgs.source = inputs.nixpkgs;
|
2021-06-16 05:30:04 +03:00
|
|
|
environment.etc.self.source = inputs.self;
|
2022-12-14 23:46:25 +03:00
|
|
|
|
|
|
|
persist.state.homeDirectories = [ ".local/share/nix" ];
|
2021-02-07 02:38:11 +03:00
|
|
|
}
|