anchor.diff:  
     firebird = cfg.package;
   
  -  pidFile = "${cfg.pidDir}/firebirdd.pid";
  +  dataDir = "${cfg.baseDir}/data";
  +  systemDir = "${cfg.baseDir}/system";
   
   in
   
  
positive.code:         # is a better way
          preStart =
            ''
              secureDir="${cfg.dataDir}/../system"
  
              mkdir -m 0700 -p \
                "${cfg.dataDir}" \
                "${cfg.pidDir}" \
                /var/log/firebird \
                "$secureDir"
  
              if ! test -e "$secureDir/security2.fdb"; then
                  cp ${firebird}/security2.fdb "$secureDir"
              fi
  
              chown -R ${cfg.user} "${cfg.pidDir}" "${cfg.dataDir}" "$secureDir" /var/log/firebird
              chmod -R 700 "${cfg.pidDir}" "${cfg.dataDir}" "$secureDir" /var/log/firebird
            '';
  
          serviceConfig.PermissionsStartOnly = true; # preStart must be run as root
  
negative.code: 
      # think about this again - and eventually make it an option
      environment.etc."firebird/firebird.conf".text = ''
        # RootDirectory = Restrict ${dataDir}
        DatabaseAccess = Restrict ${dataDir}
        ExternalFileAccess = Restrict ${dataDir}
        # what is this? is None allowed?
        UdfAccess = None
        # "Native" =  traditional interbase/firebird, "mixed" is windows only
  