anchor.diff:              example = "user@machine:/path/to/repo";
             };
   
  +          removableDevice = mkOption {
  +            type = types.bool;
  +            default = false;
  +            description = "Whether the repo (which must be local) is a removable device.";
  +          };
  +
             archiveBaseName = mkOption {
               type = types.strMatching "[^/{}]+";
               default = "${globalConfig.networking.hostName}-${name}";
  
positive.code:     builtins.substring 0 1 x == "/"      # absolute path
      || builtins.substring 0 1 x == "."   # relative path
      || builtins.match "[.*:.*]" == null; # not machine:path
   
    mkExcludeFile = cfg:
      # Write each exclude pattern to a new line
      pkgs.writeText "excludefile" (concatStringsSep "\n" cfg.exclude);
  
negative.code:       install = "install -o ${cfg.user} -g ${cfg.group}";
      in
        nameValuePair "borgbackup-job-${name}" (stringAfter [ "users" ] (''
          # Ensure that the home directory already exists
          # We can't assert createHome == true because that's not the case for root
          cd "${config.users.users.${cfg.user}.home}"
          ${install} -d .config/borg
          ${install} -d .cache/borg
        '' + optionalString (isLocalPath cfg.repo && !cfg.removableDevice) ''
          ${install} -d ${escapeShellArg cfg.repo}
        ''));
  
  