Auto gc on servers
This commit is contained in:
		
							parent
							
								
									8c97c46f5d
								
							
						
					
					
						commit
						77870b6a14
					
				|  | @ -1,8 +1,19 @@ | ||||||
|  | # hosts/server.nix | ||||||
|  | # | ||||||
|  | # Only to be used for headless servers, at home or abroad, with more | ||||||
|  | # security/automation-minded configuration. | ||||||
|  | 
 | ||||||
| { config, lib, pkgs, ... }: | { config, lib, pkgs, ... }: | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   boot.kernelPackages = pkgs.linuxPackages_latest_hardened; |   boot.kernelPackages = pkgs.linuxPackages_latest_hardened; | ||||||
| 
 | 
 | ||||||
|  |   nix.gc = { | ||||||
|  |     automatic = true; | ||||||
|  |     dates = "weekly"; | ||||||
|  |     options = "--delete-older-than 30d"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|   systemd = { |   systemd = { | ||||||
|     services.clear-log = { |     services.clear-log = { | ||||||
|       description = "Clear >1 month-old logs every week"; |       description = "Clear >1 month-old logs every week"; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue