nixos-config/profiles/nix/default.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2022-01-22 11:46:33 +03:00
{ pkgs, lib, inputs, config, ... }: {
2021-01-21 21:13:53 +03:00
nix = rec {
nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ];
2021-01-21 21:13:53 +03:00
registry.self.flake = inputs.self;
2021-06-21 21:20:38 +03:00
registry.np.flake = inputs.nixpkgs;
2021-01-21 21:13:53 +03:00
2022-02-03 01:36:37 +03:00
nrBuildUsers = config.nix.settings.max-jobs;
2021-01-21 21:13:53 +03:00
optimise.automatic = true;
extraOptions = ''
2022-03-15 12:33:19 +03:00
builders-use-substitutes = true
2021-01-21 21:13:53 +03:00
experimental-features = nix-command flakes
'';
2022-02-03 01:36:37 +03:00
settings = {
trusted-users = [ "root" "balsoft" "@wheel" ];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"serokell-1:aIojg2Vxgv7MkzPJoftOO/I8HKX622sT+c0fjnZBLj0="
];
substituters = [ "https://cache.nixos.org" ];
trusted-substituters = [
"s3://serokell-private-cache?endpoint=s3.eu-central-1.wasabisys.com&profile=serokell-private-cache-wasabi"
];
};
2022-03-15 12:33:19 +03:00
buildMachines = [
# tweag remote builder
{
hostName = "build01.tweag.io";
maxJobs = 24;
sshUser = "nix";
sshKey = "/root/.ssh/id_ed25519";
system = "x86_64-linux";
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
}
];
2021-01-21 21:13:53 +03:00
};
2021-06-08 19:35:21 +03:00
2021-06-13 20:59:08 +03:00
persist.state.directories = [ "/home/balsoft/.local/share/nix" ];
2021-06-08 19:35:21 +03:00
2021-01-21 21:13:53 +03:00
environment.etc.nixpkgs.source = inputs.nixpkgs;
2021-06-03 22:37:14 +03:00
environment.etc.self.source = inputs.self;
2021-01-21 21:13:53 +03:00
}