This commit is contained in:
		
							parent
							
								
									1a4746819b
								
							
						
					
					
						commit
						6ed8bd861b
					
				
					 1 changed files with 26 additions and 0 deletions
				
			
		
							
								
								
									
										26
									
								
								modules/nixos/services/backup/borg/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								modules/nixos/services/backup/borg/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | ||||||
|  | { config, lib, pkgs, namespace, ... }: | ||||||
|  | let | ||||||
|  |   inherit (lib) mkIf mkEnableOption; | ||||||
|  | 
 | ||||||
|  |   cfg = config.${namespace}.services.backup.borg; | ||||||
|  | in | ||||||
|  | { | ||||||
|  |   options.${namespace}.services.backup.borg = { | ||||||
|  |     enable = mkEnableOption "Borg Backup"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   config = mkIf cfg.enable { | ||||||
|  |     services = { | ||||||
|  |       borgbackup.jobs = { | ||||||
|  |         media = { | ||||||
|  |           paths = "/var/media/test"; | ||||||
|  |           encryption.mode = "none"; | ||||||
|  |           environment.BORG_SSH = "ssh -i /home/chris/.ssh/id_ed25519 -4"; | ||||||
|  |           repo = "ssh://chris@beheer.hazelhof.nl:222/home/chris/backups/media"; | ||||||
|  |           compression = "auto,zstd"; | ||||||
|  |           startAt = "daily"; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue