anchor.diff:      services.tt-rss = {
   
         enable = mkEnableOption "tt-rss";
  +
  +      root = mkOption {
  +        type = types.path;
  +        default = "/var/lib/tt-rss";
  +        example = "/var/lib/tt-rss";
  +        description = ''
  +          Root of the application.
  +        '';
  +      };
   
         user = mkOption {
           type = types.str;
  
positive.code:                else "";
  
          in ''
            rm -rf "${root}/*"
            mkdir -m 755 -p "${root}"
            cp -r "${pkgs.tt-rss}/"* "${root}"
            ln -sf "${tt-rss-config}" "${root}/config.php"
            chown -R "${cfg.user}" "${root}"
            chmod -R 755 "${root}"
          '' + (optionalString (cfg.database.type == "pgsql") ''
  
            exists=$(${callSql "select count(*) > 0 from pg_tables where tableowner = user"} \
  
negative.code: 
          serviceConfig = {
            User = "${cfg.user}";
            ExecStart = "${pkgs.php}/bin/php ${cfg.root}/update.php --daemon";
            StandardOutput = "syslog";
            StandardError = "syslog";
            PermissionsStartOnly = true;
  