anchor.diff:  
     ###### implementation
   
  -  config = let
  -    root = "/var/lib/tt-rss";
  -  in mkIf cfg.enable {
  +  config = mkIf cfg.enable {
   
       services.phpfpm.poolConfigs = if cfg.pool == "${poolName}" then {
         "${poolName}" = ''
  
positive.code:     services.tt-rss = {
  
        enable = mkEnableOption "tt-rss";
  
        user = mkOption {
          type = types.str;
  
negative.code:                else "";
  
          in ''
            rm -rf "${cfg.root}/*"
            mkdir -m 755 -p "${cfg.root}"
            cp -r "${pkgs.tt-rss}/"* "${cfg.root}"
            ln -sf "${tt-rss-config}" "${cfg.root}/config.php"
            chown -R "${cfg.user}" "${cfg.root}"
            chmod -R 755 "${cfg.root}"
          '' + (optionalString (cfg.database.type == "pgsql") ''
  
            exists=$(${callSql "select count(*) > 0 from pg_tables where tableowner = user"} \
  