| 
									
										
										
										
											2024-06-22 11:40:33 -04:00
										 |  |  | { lib, pkgs, ... }: | 
					
						
							| 
									
										
										
										
											2024-04-10 19:23:26 -04:00
										 |  |  | { | 
					
						
							|  |  |  |   nix = { | 
					
						
							| 
									
										
										
										
											2024-06-22 11:40:33 -04:00
										 |  |  |     package = pkgs.nixVersions.latest; | 
					
						
							| 
									
										
										
										
											2024-04-10 19:23:26 -04:00
										 |  |  |     diffSystem = true; | 
					
						
							|  |  |  |     settings = { | 
					
						
							|  |  |  |       experimental-features = [ | 
					
						
							|  |  |  |         "nix-command" | 
					
						
							|  |  |  |         "flakes" | 
					
						
							| 
									
										
										
										
											2025-08-16 21:41:21 -04:00
										 |  |  |         "blake3-hashes" | 
					
						
							|  |  |  |         "git-hashing" | 
					
						
							|  |  |  |         "verified-fetches" | 
					
						
							| 
									
										
										
										
											2024-04-10 19:23:26 -04:00
										 |  |  |       ]; | 
					
						
							|  |  |  |       keep-outputs = true; | 
					
						
							|  |  |  |       builders-use-substitutes = true; | 
					
						
							|  |  |  |       connect-timeout = 20; | 
					
						
							| 
									
										
										
										
											2024-04-10 20:19:33 -04:00
										 |  |  |       substituters = [ | 
					
						
							|  |  |  |         "https://cache.nixos.org/?priority=1&want-mass-query=true" | 
					
						
							|  |  |  |         "https://nix-community.cachix.org/?priority=10&want-mass-query=true" | 
					
						
							|  |  |  |       ]; | 
					
						
							|  |  |  |       trusted-substituters = [ | 
					
						
							|  |  |  |         "https://cache.nixos.org" | 
					
						
							|  |  |  |         "https://nix-community.cachix.org" | 
					
						
							|  |  |  |       ]; | 
					
						
							|  |  |  |       trusted-public-keys = [ | 
					
						
							|  |  |  |         "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" | 
					
						
							|  |  |  |         "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | 
					
						
							|  |  |  |       ]; | 
					
						
							|  |  |  |       trusted-users = [ | 
					
						
							|  |  |  |         "root" | 
					
						
							|  |  |  |         "@wheel" | 
					
						
							|  |  |  |       ]; | 
					
						
							| 
									
										
										
										
											2024-04-10 19:23:26 -04:00
										 |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # free up to 10 gb when only 1 gb left | 
					
						
							|  |  |  |     extraOptions = ''
 | 
					
						
							|  |  |  |       min-free = ${toString (1 * 1024 * 1024 * 1024)} | 
					
						
							|  |  |  |       max-free = ${toString (10 * 1024 * 1024 * 1024)} | 
					
						
							|  |  |  |     '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-20 11:33:54 -04:00
										 |  |  |     gc = lib.mkDefault { | 
					
						
							| 
									
										
										
										
											2024-04-10 19:23:26 -04:00
										 |  |  |       automatic = true; | 
					
						
							|  |  |  |       dates = "weekly"; | 
					
						
							|  |  |  |       options = "--delete-older-than 30d"; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     optimise = { | 
					
						
							|  |  |  |       automatic = true; | 
					
						
							|  |  |  |       dates = [ "01:00" ]; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |