39 lines
		
	
	
		
			901 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			901 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { ... }:
 | |
| 
 | |
| let
 | |
|   vars = import ../vars.nix;
 | |
|   restic_path = "${vars.primary_backups}/restic";
 | |
| in
 | |
| {
 | |
|   virtualisation.oci-containers.containers = {
 | |
|     restic = {
 | |
|       image = "restic/rest-server:latest";
 | |
|       volumes = [ "${restic_path}:/data" ];
 | |
|       environment = {
 | |
|         OPTIONS = "--prometheus --private-repos --htpasswd-file /data/.htpasswd";
 | |
|       };
 | |
|       ports = [ "8010:8000" ];
 | |
|       extraOptions = [
 | |
|         "--restart=always"
 | |
|         "--network=restic_restic"
 | |
|       ];
 | |
|     };
 | |
| 
 | |
|     grafana = {
 | |
|       image = "grafana/grafana:latest";
 | |
|       extraOptions = [
 | |
|         "--restart=always"
 | |
|         "--network=haproxy-net"
 | |
|       ];
 | |
|       volumes = [
 | |
|         "grafanadata:/var/lib/grafana"
 | |
|         "${restic_path}/dashboards:/dashboards"
 | |
|         "${restic_path}/grafana.ini:/etc/grafana/grafana.ini"
 | |
|       ];
 | |
|       environment = {
 | |
|         GF_USERS_DEFAULT_THEME = "dark";
 | |
|       };
 | |
|     };
 | |
|   };
 | |
| }
 |