Required tree-wide re-wiring of the host option. Now, rather than each host having a monolithic restic.nix file, the hosts restic.nix file just specifies the password and url of the restic repository. Eatch module then definies specific paths to backup and any pre and post commands that need to be performed. Each backed up service gets an independent systemd backup service and timer.
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			567 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			567 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  config,
 | 
						|
  pkgs,
 | 
						|
  lib,
 | 
						|
  ...
 | 
						|
}: {
 | 
						|
  options = {
 | 
						|
    host.details = {
 | 
						|
      user = lib.mkOption {
 | 
						|
        type = lib.types.str;
 | 
						|
        description = "Primary human user";
 | 
						|
      };
 | 
						|
      fullName = lib.mkOption {
 | 
						|
        type = lib.types.str;
 | 
						|
        description = "Primary human users long name";
 | 
						|
      };
 | 
						|
      gui.enable = lib.mkEnableOption "enable GUI";
 | 
						|
      isLaptop = lib.mkEnableOption "machine is a laptop";
 | 
						|
      isVm = lib.mkEnableOption "machine is a virtual machine";
 | 
						|
      isSever = lib.mkEnableOption "machine is primarily a server";
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |