anchor.diff: -{ config, lib, pkgs, ...}:
  +{ config, lib, pkgs, ... }:
   
   with lib;
  -
   let
     cfg = config.services.duplicity;
   
     stateDirectory = "/var/lib/duplicity";
   
  -  localTarget = if hasPrefix "file://" cfg.targetUrl
  +  localTarget =
  +    if hasPrefix "file://" cfg.targetUrl
       then removePrefix "file://" cfg.targetUrl else null;
   
  -in {
  +in
  +{
     options.services.duplicity = {
       enable = mkEnableOption "backups with duplicity";
   
  
positive.code: 
      exclude = mkOption {
        type = types.listOf types.str;
        default = [];
        description = ''
          List of paths to exclude from backups. See the FILE SELECTION section in
          <citerefentry><refentrytitle>duplicity</refentrytitle>
  
negative.code: 
      extraFlags = mkOption {
        type = types.listOf types.str;
        default = [ ];
        example = [ "--full-if-older-than" "1M" ];
        description = ''
          Extra command-line flags passed to duplicity. See
  